home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1995-04-10 | 552.8 KB | [ONLN/HLX2] |
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
Confidence | Program | Detection | Match Type | Support
|
---|
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Sat Jul 16 07:30:47 1994, modified Mon Apr 10 12:56:25 1995, creator 'HLX2', type 'ONLN', 555864 bytes "Adding QD GX Printing" , at 0x87bd8 9861 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
100%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [ONLN] |
macFileCreator | [HLX2] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 15 41 64 64 69 6e 67 | 20 51 44 20 47 58 20 50 |..Adding| QD GX P|
|00000010| 72 69 6e 74 69 6e 67 00 | 00 00 00 00 00 00 00 00 |rinting.|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 4f 4e 4c 4e 48 4c 58 | 32 01 00 00 00 00 00 00 |.ONLNHLX|2.......|
|00000050| 00 00 00 00 08 7b 58 00 | 00 26 85 aa 4d 75 67 ab |.....{X.|.&..Mug.|
|00000060| af 13 b9 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 51 4a 00 00 |........|....QJ..|
|00000080| 41 64 64 69 6e 67 20 51 | 75 69 63 6b 44 72 61 77 |Adding Q|uickDraw|
|00000090| 20 47 58 20 50 72 69 6e | 74 69 6e 67 20 74 6f 20 | GX Prin|ting to |
|000000a0| 51 75 69 63 6b 44 72 61 | 77 20 41 70 70 6c 69 63 |QuickDra|w Applic|
|000000b0| 61 74 69 6f 6e 73 20 09 | 09 0d 09 4e 6f 77 20 74 |ations .|...Now t|
|000000c0| 68 61 74 20 51 75 69 63 | 6b 44 72 61 77 20 47 58 |hat Quic|kDraw GX|
|000000d0| 20 68 61 73 20 62 65 65 | 6e 20 72 65 6c 65 61 73 | has bee|n releas|
|000000e0| 65 64 2c 20 79 6f 75 20 | 6d 61 79 20 62 65 20 77 |ed, you |may be w|
|000000f0| 6f 6e 64 65 72 69 6e 67 | 20 77 68 61 74 20 74 6f |ondering| what to|
|00000100| 20 64 6f 20 77 69 74 68 | 20 79 6f 75 72 20 6f 6c | do with| your ol|
|00000110| 64 65 72 20 51 75 69 63 | 6b 44 72 61 77 20 61 70 |der Quic|kDraw ap|
|00000120| 70 6c 69 63 61 74 69 6f | 6e 73 2e 20 54 68 65 20 |plicatio|ns. The |
|00000130| 67 6f 6f 64 20 6e 65 77 | 73 20 69 73 20 74 68 61 |good new|s is tha|
|00000140| 74 20 62 79 20 61 64 64 | 69 6e 67 20 61 20 72 65 |t by add|ing a re|
|00000150| 6c 61 74 69 76 65 6c 79 | 20 73 6d 61 6c 6c 20 70 |latively| small p|
|00000160| 65 72 63 65 6e 74 61 67 | 65 20 6f 66 20 63 6f 64 |ercentag|e of cod|
|00000170| 65 20 74 6f 20 79 6f 75 | 72 20 65 78 69 73 74 69 |e to you|r existi|
|00000180| 6e 67 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 73 2c |ng appli|cations,|
|00000190| 20 79 6f 75 20 63 61 6e | 20 73 75 70 70 6f 72 74 | you can| support|
|000001a0| 20 61 6c 6c 20 74 68 65 | 20 6e 65 77 20 66 65 61 | all the| new fea|
|000001b0| 74 75 72 65 73 20 6f 66 | 20 74 68 65 20 51 75 69 |tures of| the Qui|
|000001c0| 63 6b 44 72 61 77 20 47 | 58 20 70 72 69 6e 74 69 |ckDraw G|X printi|
|000001d0| 6e 67 20 61 72 63 68 69 | 74 65 63 74 75 72 65 20 |ng archi|tecture |
|000001e0| 61 6e 64 20 73 74 69 6c | 6c 20 72 65 74 61 69 6e |and stil|l retain|
|000001f0| 20 66 75 6c 6c 20 63 6f | 6d 70 61 74 69 62 69 6c | full co|mpatibil|
|00000200| 69 74 79 20 77 69 74 68 | 20 6e 6f 6e d0 51 75 69 |ity with| non.Qui|
|00000210| 63 6b 44 72 61 77 20 47 | 58 20 73 79 73 74 65 6d |ckDraw G|X system|
|00000220| 73 2e 20 09 0d 0d 44 41 | 56 45 20 48 45 52 53 45 |s. ...DA|VE HERSE|
|00000230| 59 0d 09 43 6f 6d 70 61 | 74 69 62 69 6c 69 74 79 |Y..Compa|tibility|
|00000240| 20 77 69 74 68 20 74 68 | 65 20 65 78 69 73 74 69 | with th|e existi|
|00000250| 6e 67 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 20 62 |ng appli|cation b|
|00000260| 61 73 65 20 77 61 73 20 | 61 20 70 72 69 6d 61 72 |ase was |a primar|
|00000270| 79 20 63 6f 6e 63 65 72 | 6e 20 64 75 72 69 6e 67 |y concer|n during|
|00000280| 20 74 68 65 20 64 65 76 | 65 6c 6f 70 6d 65 6e 74 | the dev|elopment|
|00000290| 20 6f 66 20 51 75 69 63 | 6b 44 72 61 77 20 47 58 | of Quic|kDraw GX|
|000002a0| 3b 20 6f 6e 6c 79 20 74 | 68 65 20 6d 6f 73 74 20 |; only t|he most |
|000002b0| 68 61 72 64 65 6e 65 64 | 20 d2 70 72 69 6e 74 20 |hardened| .print |
|000002c0| 63 72 69 6d 69 6e 61 6c | 73 d3 20 73 68 6f 75 6c |criminal|s. shoul|
|000002d0| 64 20 68 61 76 65 20 63 | 6f 6d 70 61 74 69 62 69 |d have c|ompatibi|
|000002e0| 6c 69 74 79 20 70 72 6f | 62 6c 65 6d 73 2e 20 53 |lity pro|blems. S|
|000002f0| 69 6e 63 65 20 61 20 70 | 72 65 d0 51 75 69 63 6b |ince a p|re.Quick|
|00000300| 44 72 61 77 20 47 58 20 | 61 70 70 6c 69 63 61 74 |Draw GX |applicat|
|00000310| 69 6f 6e 20 73 68 6f 75 | 6c 64 20 77 6f 72 6b 20 |ion shou|ld work |
|00000320| 69 6e 20 62 6f 74 68 20 | 51 75 69 63 6b 44 72 61 |in both |QuickDra|
|00000330| 77 20 47 58 20 61 6e 64 | 20 6e 6f 6e d0 51 75 69 |w GX and| non.Qui|
|00000340| 63 6b 44 72 61 77 20 47 | 58 20 65 6e 76 69 72 6f |ckDraw G|X enviro|
|00000350| 6e 6d 65 6e 74 73 2c 20 | 79 6f 75 20 6d 61 79 20 |nments, |you may |
|00000360| 74 68 69 6e 6b 20 74 68 | 61 74 20 6c 65 61 76 69 |think th|at leavi|
|00000370| 6e 67 20 79 6f 75 72 20 | 63 6f 64 65 20 61 73 20 |ng your |code as |
|00000380| 69 74 20 73 74 61 6e 64 | 73 20 69 73 20 67 6f 6f |it stand|s is goo|
|00000390| 64 20 65 6e 6f 75 67 68 | 2e 20 42 65 63 6f 6d 69 |d enough|. Becomi|
|000003a0| 6e 67 20 63 6f 6d 70 61 | 74 69 62 6c 65 20 70 72 |ng compa|tible pr|
|000003b0| 6f 62 61 62 6c 79 20 64 | 6f 65 73 6e d5 74 20 72 |obably d|oesn.t r|
|000003c0| 65 71 75 69 72 65 20 61 | 6e 79 20 72 65 76 69 73 |equire a|ny revis|
|000003d0| 69 6f 6e 73 20 74 6f 20 | 79 6f 75 72 20 65 78 69 |ions to |your exi|
|000003e0| 73 74 69 6e 67 20 73 6f | 66 74 77 61 72 65 2c 20 |sting so|ftware, |
|000003f0| 61 6e 64 20 74 68 65 20 | 66 61 63 74 20 74 68 61 |and the |fact tha|
|00000400| 74 20 79 6f 75 72 20 61 | 70 70 6c 69 63 61 74 69 |t your a|pplicati|
|00000410| 6f 6e 20 77 69 6c 6c 20 | 70 65 72 66 6f 72 6d 20 |on will |perform |
|00000420| 77 69 74 68 20 6f 72 20 | 77 69 74 68 6f 75 74 20 |with or |without |
|00000430| 51 75 69 63 6b 44 72 61 | 77 20 47 58 20 73 6f 75 |QuickDra|w GX sou|
|00000440| 6e 64 73 20 6c 69 6b 65 | 20 61 20 70 72 65 74 74 |nds like| a prett|
|00000450| 79 20 67 6f 6f 64 20 64 | 65 61 6c 2e 20 57 68 65 |y good d|eal. Whe|
|00000460| 72 65 d5 73 20 74 68 65 | 20 63 61 74 63 68 3f 0d |re.s the| catch?.|
|00000470| 48 65 72 65 20 69 74 20 | 69 73 3a 20 41 20 6e 6f |Here it |is: A no|
|00000480| 6e d0 51 75 69 63 6b 44 | 72 61 77 20 47 58 20 61 |n.QuickD|raw GX a|
|00000490| 70 70 6c 69 63 61 74 69 | 6f 6e 20 64 6f 65 73 6e |pplicati|on doesn|
|000004a0| d5 74 20 68 61 76 65 20 | 61 63 63 65 73 73 20 74 |.t have |access t|
|000004b0| 6f 20 73 65 76 65 72 61 | 6c 20 6b 65 79 20 66 65 |o severa|l key fe|
|000004c0| 61 74 75 72 65 73 20 6f | 66 20 51 75 69 63 6b 44 |atures o|f QuickD|
|000004d0| 72 61 77 20 47 58 2c 20 | 73 6f 20 69 74 73 20 75 |raw GX, |so its u|
|000004e0| 73 65 72 73 20 63 61 6e | d5 74 20 74 61 6b 65 20 |sers can|.t take |
|000004f0| 61 64 76 61 6e 74 61 67 | 65 20 6f 66 20 6d 61 6e |advantag|e of man|
|00000500| 79 20 6f 66 20 74 68 65 | 20 6e 65 77 20 70 72 69 |y of the| new pri|
|00000510| 6e 74 69 6e 67 20 66 65 | 61 74 75 72 65 73 2e 20 |nting fe|atures. |
|00000520| 46 6f 72 20 65 78 61 6d | 70 6c 65 2c 20 77 69 74 |For exam|ple, wit|
|00000530| 68 20 51 75 69 63 6b 44 | 72 61 77 20 47 58 20 61 |h QuickD|raw GX a|
|00000540| 20 75 73 65 72 20 63 61 | 6e 3a 20 0d a5 09 52 65 | user ca|n: ...Re|
|00000550| 64 69 72 65 63 74 20 70 | 72 69 6e 74 20 6a 6f 62 |direct p|rint job|
|00000560| 73 20 75 73 69 6e 67 20 | 74 68 65 20 6e 65 77 20 |s using |the new |
|00000570| 50 72 69 6e 74 20 64 69 | 61 6c 6f 67 2e 20 0d a5 |Print di|alog. ..|
|00000580| 09 43 68 6f 6f 73 65 20 | 70 61 67 65 2d 62 79 2d |.Choose |page-by-|
|00000590| 70 61 67 65 20 66 6f 72 | 6d 61 74 74 69 6e 67 2c |page for|matting,|
|000005a0| 20 73 6f 20 74 68 61 74 | 20 70 61 67 65 20 31 20 | so that| page 1 |
|000005b0| 70 72 69 6e 74 73 20 6f | 6e 20 55 53 20 4c 65 74 |prints o|n US Let|
|000005c0| 74 65 72 2c 20 70 61 67 | 65 20 32 20 70 72 69 6e |ter, pag|e 2 prin|
|000005d0| 74 73 20 6f 6e 20 23 31 | 30 20 65 6e 76 65 6c 6f |ts on #1|0 envelo|
|000005e0| 70 65 2c 20 70 61 67 65 | 20 33 20 70 72 69 6e 74 |pe, page| 3 print|
|000005f0| 73 20 6f 6e 20 6c 61 6e | 64 73 63 61 70 65 2d 6f |s on lan|dscape-o|
|00000600| 72 69 65 6e 74 65 64 20 | 55 53 20 4c 65 67 61 6c |riented |US Legal|
|00000610| 2c 20 61 6e 64 20 73 6f | 20 6f 6e 2c 20 69 6e 73 |, and so| on, ins|
|00000620| 74 65 61 64 20 6f 66 20 | 70 72 69 6e 74 69 6e 67 |tead of |printing|
|00000630| 20 74 68 65 20 65 6e 74 | 69 72 65 20 64 6f 63 75 | the ent|ire docu|
|00000640| 6d 65 6e 74 20 69 6e 20 | 61 20 73 69 6e 67 6c 65 |ment in |a single|
|00000650| 20 66 6f 72 6d 61 74 2e | 0d a5 09 57 6f 72 6b 20 | format.|...Work |
|00000660| 77 69 74 68 20 74 68 65 | 20 6e 65 77 20 51 75 69 |with the| new Qui|
|00000670| 63 6b 44 72 61 77 20 47 | 58 20 70 72 69 6e 74 69 |ckDraw G|X printi|
|00000680| 6e 67 20 64 69 61 6c 6f | 67 73 20 28 73 68 6f 77 |ng dialo|gs (show|
|00000690| 6e 20 69 6e 20 46 69 67 | 75 72 65 20 31 29 20 69 |n in Fig|ure 1) i|
|000006a0| 6e 73 74 65 61 64 20 6f | 66 20 74 68 65 20 64 69 |nstead o|f the di|
|000006b0| 61 6c 6f 67 73 20 70 72 | 6f 76 69 64 65 64 20 66 |alogs pr|ovided f|
|000006c0| 6f 72 20 63 6f 6d 70 61 | 74 69 62 69 6c 69 74 79 |or compa|tibility|
|000006d0| 20 77 69 74 68 20 6e 6f | 6e d0 51 75 69 63 6b 44 | with no|n.QuickD|
|000006e0| 72 61 77 20 47 58 20 61 | 70 70 6c 69 63 61 74 69 |raw GX a|pplicati|
|000006f0| 6f 6e 73 2e 20 0d a5 09 | 55 73 65 20 66 65 61 74 |ons. ...|Use feat|
|00000700| 75 72 65 73 20 70 72 6f | 76 69 64 65 64 20 62 79 |ures pro|vided by|
|00000710| 20 70 72 69 6e 74 69 6e | 67 20 65 78 74 65 6e 73 | printin|g extens|
|00000720| 69 6f 6e 73 2e 20 50 72 | 69 6e 74 69 6e 67 20 65 |ions. Pr|inting e|
|00000730| 78 74 65 6e 73 69 6f 6e | 73 20 63 61 6e 20 61 64 |xtension|s can ad|
|00000740| 64 20 69 74 65 6d 73 20 | 74 6f 20 74 68 65 20 51 |d items |to the Q|
|00000750| 75 69 63 6b 44 72 61 77 | 20 47 58 20 70 72 69 6e |uickDraw| GX prin|
|00000760| 74 69 6e 67 20 64 69 61 | 6c 6f 67 73 2c 20 62 75 |ting dia|logs, bu|
|00000770| 74 20 6e 6f 74 20 74 6f | 20 74 68 65 20 63 6f 6d |t not to| the com|
|00000780| 70 61 74 69 62 69 6c 69 | 74 79 20 64 69 61 6c 6f |patibili|ty dialo|
|00000790| 67 73 2e 20 28 41 64 64 | 65 64 20 69 74 65 6d 73 |gs. (Add|ed items|
|000007a0| 20 73 68 6f 77 20 75 70 | 20 61 73 20 69 63 6f 6e | show up| as icon|
|000007b0| 73 20 69 6e 20 74 68 65 | 20 63 6f 6c 75 6d 6e 20 |s in the| column |
|000007c0| 6f 6e 20 74 68 65 20 6c | 65 66 74 20 73 69 64 65 |on the l|eft side|
|000007d0| 20 6f 66 20 65 61 63 68 | 20 64 69 61 6c 6f 67 2e | of each| dialog.|
|000007e0| 29 20 0d a5 09 50 72 69 | 6e 74 20 61 20 73 69 6e |) ...Pri|nt a sin|
|000007f0| 67 6c 65 20 63 6f 70 79 | 20 6f 66 20 61 20 64 6f |gle copy| of a do|
|00000800| 63 75 6d 65 6e 74 20 77 | 69 74 68 20 74 68 65 20 |cument w|ith the |
|00000810| 6e 65 77 20 50 72 69 6e | 74 20 4f 6e 65 20 43 6f |new Prin|t One Co|
|00000820| 70 79 20 63 6f 6d 6d 61 | 6e 64 2e 0d a5 09 50 72 |py comma|nd....Pr|
|00000830| 69 6e 74 20 64 6f 63 75 | 6d 65 6e 74 73 20 62 79 |int docu|ments by|
|00000840| 20 64 72 61 67 67 69 6e | 67 20 74 68 65 6d 20 74 | draggin|g them t|
|00000850| 6f 20 64 65 73 6b 74 6f | 70 20 70 72 69 6e 74 65 |o deskto|p printe|
|00000860| 72 73 2e 0d 09 0d 44 41 | 56 45 20 48 45 52 53 45 |rs....DA|VE HERSE|
|00000870| 59 20 6c 69 6b 65 73 20 | 74 68 65 20 61 6e 6e 6f |Y likes |the anno|
|00000880| 79 69 6e 67 20 62 75 7a | 7a 69 6e 67 20 6e 6f 69 |ying buz|zing noi|
|00000890| 73 65 20 74 68 61 74 20 | 49 6d 61 67 65 57 72 69 |se that |ImageWri|
|000008a0| 74 65 72 73 20 61 6e 64 | 20 49 6d 61 67 65 57 72 |ters and| ImageWr|
|000008b0| 69 74 65 72 20 4c 51 73 | 20 6d 61 6b 65 2e 20 48 |iter LQs| make. H|
|000008c0| 65 20 61 6c 73 6f 20 65 | 6e 6a 6f 79 73 20 6c 69 |e also e|njoys li|
|000008d0| 73 74 65 6e 69 6e 67 20 | 74 6f 20 47 75 6e 73 20 |stening |to Guns |
|000008e0| 4e 20 52 6f 73 65 73 2c | 20 62 75 74 20 6f 6e 6c |N Roses,| but onl|
|000008f0| 79 20 77 68 69 6c 65 20 | 68 65 d5 73 20 61 6e 73 |y while |he.s ans|
|00000900| 77 65 72 69 6e 67 20 64 | 65 76 65 6c 6f 70 65 72 |wering d|eveloper|
|00000910| 20 65 2d 6d 61 69 6c 20 | 61 74 20 41 70 70 6c 65 | e-mail |at Apple|
|00000920| d5 73 20 44 65 76 65 6c | 6f 70 65 72 20 53 75 70 |.s Devel|oper Sup|
|00000930| 70 6f 72 74 20 43 65 6e | 74 65 72 2e 20 44 61 76 |port Cen|ter. Dav|
|00000940| 65 20 72 65 63 65 6e 74 | 6c 79 20 77 72 6f 74 65 |e recent|ly wrote|
|00000950| 20 61 20 09 51 75 69 63 | 6b 44 72 61 77 20 47 58 | a .Quic|kDraw GX|
|00000960| 20 70 72 69 6e 74 65 72 | 20 64 72 69 76 65 72 20 | printer| driver |
|00000970| 66 6f 72 20 74 68 65 20 | 41 70 70 6c 65 20 43 6f |for the |Apple Co|
|00000980| 6c 6f 72 20 50 6c 6f 74 | 74 65 72 20 28 77 68 69 |lor Plot|ter (whi|
|00000990| 63 68 20 69 73 20 66 72 | 6f 6d 20 61 6e 20 65 72 |ch is fr|om an er|
|000009a0| 61 20 62 65 66 6f 72 65 | 20 74 68 65 20 66 69 72 |a before| the fir|
|000009b0| 73 74 20 4d 61 63 69 6e | 74 6f 73 68 29 2e 20 57 |st Macin|tosh). W|
|000009c0| 68 65 6e 20 61 73 6b 65 | 64 20 77 68 79 20 68 65 |hen aske|d why he|
|000009d0| 20 62 6f 74 68 65 72 65 | 64 2c 20 68 65 20 73 61 | bothere|d, he sa|
|000009e0| 69 64 20 d2 57 65 6c 6c | 2c 20 69 74 20 6d 61 6b |id .Well|, it mak|
|000009f0| 65 73 20 74 68 69 73 20 | 63 6f 6f 6c 20 77 61 63 |es this |cool wac|
|00000a00| 6b 61 2d 77 61 63 6b 61 | 20 73 6f 75 6e 64 2e d3 |ka-wacka| sound..|
|00000a10| 20 43 6c 65 61 72 6c 79 | 2c 20 44 61 76 65 20 69 | Clearly|, Dave i|
|00000a20| 73 20 61 6e 20 61 75 64 | 69 6f 70 68 69 6c 65 20 |s an aud|iophile |
|00000a30| 66 6f 72 20 74 68 65 20 | d5 39 30 73 2e a5 09 0d |for the |.90s....|
|00000a40| 20 20 20 20 20 20 20 20 | 20 0d 09 50 61 67 65 20 | | ..Page |
|00000a50| 53 65 74 75 70 20 64 69 | 61 6c 6f 67 09 43 75 73 |Setup di|alog.Cus|
|00000a60| 74 6f 6d 20 50 61 67 65 | 20 53 65 74 75 70 20 64 |tom Page| Setup d|
|00000a70| 69 61 6c 6f 67 0d 09 50 | 72 69 6e 74 20 64 69 61 |ialog..P|rint dia|
|00000a80| 6c 6f 67 0d 46 69 67 75 | 72 65 20 31 2e 20 54 68 |log.Figu|re 1. Th|
|00000a90| 65 20 6e 65 77 20 51 75 | 69 63 6b 44 72 61 77 20 |e new Qu|ickDraw |
|00000aa0| 47 58 20 70 72 69 6e 74 | 69 6e 67 20 64 69 61 6c |GX print|ing dial|
|00000ab0| 6f 67 73 0d 55 73 65 72 | 73 20 61 72 65 20 73 68 |ogs.User|s are sh|
|00000ac0| 75 74 20 6f 75 74 20 66 | 72 6f 6d 20 61 6c 6c 20 |ut out f|rom all |
|00000ad0| 74 68 65 73 65 20 66 65 | 61 74 75 72 65 73 20 69 |these fe|atures i|
|00000ae0| 66 20 74 68 65 79 d5 72 | 65 20 75 73 69 6e 67 20 |f they.r|e using |
|00000af0| 61 20 6e 6f 6e d0 51 75 | 69 63 6b 44 72 61 77 20 |a non.Qu|ickDraw |
|00000b00| 47 58 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 2e 20 |GX appli|cation. |
|00000b10| 49 6e 20 74 68 69 73 20 | 61 72 74 69 63 6c 65 2c |In this |article,|
|00000b20| 20 79 6f 75 d5 6c 6c 20 | 73 65 65 20 68 6f 77 20 | you.ll |see how |
|00000b30| 74 6f 20 69 6e 63 72 65 | 61 73 65 20 61 6e 20 61 |to incre|ase an a|
|00000b40| 70 70 6c 69 63 61 74 69 | 6f 6e d5 73 20 6c 65 76 |pplicati|on.s lev|
|00000b50| 65 6c 20 6f 66 20 51 75 | 69 63 6b 44 72 61 77 20 |el of Qu|ickDraw |
|00000b60| 47 58 20 73 75 70 70 6f | 72 74 2e 20 49 d5 6c 6c |GX suppo|rt. I.ll|
|00000b70| 20 74 61 6b 65 20 61 20 | 51 75 69 63 6b 44 72 61 | take a |QuickDra|
|00000b80| 77 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 20 61 6e |w applic|ation an|
|00000b90| 64 20 63 6f 6e 76 65 72 | 74 20 69 74 20 73 74 65 |d conver|t it ste|
|00000ba0| 70 20 62 79 20 73 74 65 | 70 20 69 6e 74 6f 20 61 |p by ste|p into a|
|00000bb0| 6e 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 20 74 68 |n applic|ation th|
|00000bc0| 61 74 20 66 75 6c 6c 79 | 20 73 75 70 70 6f 72 74 |at fully| support|
|00000bd0| 73 20 62 6f 74 68 20 74 | 68 65 20 51 75 69 63 6b |s both t|he Quick|
|00000be0| 44 72 61 77 20 61 6e 64 | 20 51 75 69 63 6b 44 72 |Draw and| QuickDr|
|00000bf0| 61 77 20 47 58 20 70 72 | 69 6e 74 69 6e 67 20 61 |aw GX pr|inting a|
|00000c00| 72 63 68 69 74 65 63 74 | 75 72 65 73 2e 20 46 69 |rchitect|ures. Fi|
|00000c10| 72 73 74 2c 20 77 65 d5 | 6c 6c 20 63 6f 6e 73 69 |rst, we.|ll consi|
|00000c20| 64 65 72 20 73 6f 6d 65 | 20 64 65 66 69 6e 69 74 |der some| definit|
|00000c30| 69 6f 6e 73 20 61 6e 64 | 20 62 61 63 6b 67 72 6f |ions and| backgro|
|00000c40| 75 6e 64 20 69 6e 66 6f | 72 6d 61 74 69 6f 6e 2e |und info|rmation.|
|00000c50| 20 0d 44 49 46 46 45 52 | 45 4e 54 20 4c 45 56 45 | .DIFFER|ENT LEVE|
|00000c60| 4c 53 20 4f 46 20 51 55 | 49 43 4b 44 52 41 57 20 |LS OF QU|ICKDRAW |
|00000c70| 47 58 20 53 55 50 50 4f | 52 54 0d 54 6f 20 62 65 |GX SUPPO|RT.To be|
|00000c80| 67 69 6e 2c 20 6c 65 74 | d5 73 20 64 65 66 69 6e |gin, let|.s defin|
|00000c90| 65 20 74 68 65 20 64 69 | 66 66 65 72 65 6e 74 20 |e the di|fferent |
|00000ca0| 6c 65 76 65 6c 73 20 6f | 66 20 51 75 69 63 6b 44 |levels o|f QuickD|
|00000cb0| 72 61 77 20 47 58 20 73 | 75 70 70 6f 72 74 20 28 |raw GX s|upport (|
|00000cc0| 66 72 6f 6d 20 6c 6f 77 | 65 73 74 20 74 6f 20 68 |from low|est to h|
|00000cd0| 69 67 68 65 73 74 29 20 | 74 68 61 74 20 61 6e 20 |ighest) |that an |
|00000ce0| 61 70 70 6c 69 63 61 74 | 69 6f 6e 20 63 61 6e 20 |applicat|ion can |
|00000cf0| 68 61 76 65 3a 0d a5 09 | 51 75 69 63 6b 44 72 61 |have:...|QuickDra|
|00000d00| 77 20 47 58 20 75 6e 61 | 77 61 72 65 3a 20 54 68 |w GX una|ware: Th|
|00000d10| 65 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 20 64 6f |e applic|ation do|
|00000d20| 65 73 6e d5 74 20 69 6d | 70 6c 65 6d 65 6e 74 20 |esn.t im|plement |
|00000d30| 61 6e 79 20 51 75 69 63 | 6b 44 72 61 77 20 47 58 |any Quic|kDraw GX|
|00000d40| 20 63 6f 64 65 2c 20 61 | 6e 64 20 51 75 69 63 6b | code, a|nd Quick|
|00000d50| 44 72 61 77 20 47 58 20 | 74 72 61 6e 73 6c 61 74 |Draw GX |translat|
|00000d60| 65 73 20 61 6c 6c 20 51 | 75 69 63 6b 44 72 61 77 |es all Q|uickDraw|
|00000d70| 20 70 72 69 6e 74 69 6e | 67 20 61 6e 64 20 64 72 | printin|g and dr|
|00000d80| 61 77 69 6e 67 20 63 61 | 6c 6c 73 20 69 6e 74 6f |awing ca|lls into|
|00000d90| 20 51 75 69 63 6b 44 72 | 61 77 20 47 58 20 65 71 | QuickDr|aw GX eq|
|00000da0| 75 69 76 61 6c 65 6e 74 | 73 2e 20 49 6e 20 6f 74 |uivalent|s. In ot|
|00000db0| 68 65 72 20 77 6f 72 64 | 73 2c 20 74 68 69 73 20 |her word|s, this |
|00000dc0| 69 73 20 61 20 6e 6f 6e | d0 51 75 69 63 6b 44 72 |is a non|.QuickDr|
|00000dd0| 61 77 20 47 58 20 61 70 | 70 6c 69 63 61 74 69 6f |aw GX ap|plicatio|
|00000de0| 6e 2e 0d a5 09 51 75 69 | 63 6b 44 72 61 77 20 47 |n....Qui|ckDraw G|
|00000df0| 58 20 61 77 61 72 65 3a | 20 54 68 65 20 61 70 70 |X aware:| The app|
|00000e00| 6c 69 63 61 74 69 6f 6e | 20 69 6d 70 6c 65 6d 65 |lication| impleme|
|00000e10| 6e 74 73 20 61 20 63 6f | 72 65 20 73 65 74 20 6f |nts a co|re set o|
|00000e20| 66 20 51 75 69 63 6b 44 | 72 61 77 20 47 58 20 70 |f QuickD|raw GX p|
|00000e30| 72 69 6e 74 69 6e 67 20 | 66 65 61 74 75 72 65 73 |rinting |features|
|00000e40| 20 62 75 74 20 72 65 74 | 61 69 6e 73 20 63 6f 6d | but ret|ains com|
|00000e50| 70 61 74 69 62 69 6c 69 | 74 79 20 77 69 74 68 20 |patibili|ty with |
|00000e60| 64 6f 63 75 6d 65 6e 74 | 73 20 63 72 65 61 74 65 |document|s create|
|00000e70| 64 20 77 69 74 68 20 65 | 61 72 6c 69 65 72 20 76 |d with e|arlier v|
|00000e80| 65 72 73 69 6f 6e 73 2e | 0d a5 09 51 75 69 63 6b |ersions.|...Quick|
|00000e90| 44 72 61 77 20 47 58 20 | 73 61 76 76 79 3a 20 54 |Draw GX |savvy: T|
|00000ea0| 68 65 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 20 69 |he appli|cation i|
|00000eb0| 6d 70 6c 65 6d 65 6e 74 | 73 20 66 75 6c 6c 20 73 |mplement|s full s|
|00000ec0| 75 70 70 6f 72 74 20 66 | 6f 72 20 51 75 69 63 6b |upport f|or Quick|
|00000ed0| 44 72 61 77 20 47 58 20 | 67 72 61 70 68 69 63 73 |Draw GX |graphics|
|00000ee0| 2c 20 74 79 70 6f 67 72 | 61 70 68 79 2c 20 61 6e |, typogr|aphy, an|
|00000ef0| 64 20 70 72 69 6e 74 69 | 6e 67 20 66 65 61 74 75 |d printi|ng featu|
|00000f00| 72 65 73 2e 20 49 74 20 | 61 6c 73 6f 20 72 65 74 |res. It |also ret|
|00000f10| 61 69 6e 73 20 63 6f 6d | 70 61 74 69 62 69 6c 69 |ains com|patibili|
|00000f20| 74 79 20 77 69 74 68 20 | 64 6f 63 75 6d 65 6e 74 |ty with |document|
|00000f30| 73 20 63 72 65 61 74 65 | 64 20 77 69 74 68 20 65 |s create|d with e|
|00000f40| 61 72 6c 69 65 72 20 76 | 65 72 73 69 6f 6e 73 2e |arlier v|ersions.|
|00000f50| 0d a5 09 51 75 69 63 6b | 44 72 61 77 20 47 58 20 |...Quick|Draw GX |
|00000f60| 64 65 70 65 6e 64 65 6e | 74 3a 20 54 68 65 20 61 |dependen|t: The a|
|00000f70| 70 70 6c 69 63 61 74 69 | 6f 6e 20 72 65 71 75 69 |pplicati|on requi|
|00000f80| 72 65 73 20 74 68 65 20 | 70 72 65 73 65 6e 63 65 |res the |presence|
|00000f90| 20 6f 66 20 51 75 69 63 | 6b 44 72 61 77 20 47 58 | of Quic|kDraw GX|
|00000fa0| 20 67 72 61 70 68 69 63 | 73 2c 20 74 79 70 6f 67 | graphic|s, typog|
|00000fb0| 72 61 70 68 79 2c 20 61 | 6e 64 20 70 72 69 6e 74 |raphy, a|nd print|
|00000fc0| 69 6e 67 20 72 6f 75 74 | 69 6e 65 73 20 74 6f 20 |ing rout|ines to |
|00000fd0| 66 75 6e 63 74 69 6f 6e | 2e 0d 41 70 70 6c 69 63 |function|..Applic|
|00000fe0| 61 74 69 6f 6e 73 20 64 | 6f 6e d5 74 20 6e 65 65 |ations d|on.t nee|
|00000ff0| 64 20 74 6f 20 69 6d 70 | 6c 65 6d 65 6e 74 20 61 |d to imp|lement a|
|00001000| 6e 79 20 63 6f 64 65 20 | 74 6f 20 62 65 20 51 75 |ny code |to be Qu|
|00001010| 69 63 6b 44 72 61 77 20 | 47 58 20 75 6e 61 77 61 |ickDraw |GX unawa|
|00001020| 72 65 2e 20 42 65 63 6f | 6d 69 6e 67 20 51 75 69 |re. Beco|ming Qui|
|00001030| 63 6b 44 72 61 77 20 47 | 58 20 61 77 61 72 65 20 |ckDraw G|X aware |
|00001040| 72 65 71 75 69 72 65 73 | 20 73 6f 6d 65 20 63 6f |requires| some co|
|00001050| 64 69 6e 67 2c 20 62 75 | 74 20 74 79 70 69 63 61 |ding, bu|t typica|
|00001060| 6c 6c 79 20 6e 6f 74 20 | 76 65 72 79 20 6d 75 63 |lly not |very muc|
|00001070| 68 2e 20 4d 61 6b 69 6e | 67 20 79 6f 75 72 20 61 |h. Makin|g your a|
|00001080| 70 70 6c 69 63 61 74 69 | 6f 6e 20 51 75 69 63 6b |pplicati|on Quick|
|00001090| 44 72 61 77 20 47 58 20 | 61 77 61 72 65 20 69 73 |Draw GX |aware is|
|000010a0| 20 74 68 65 20 6d 69 6e | 69 6d 61 6c 20 6c 65 76 | the min|imal lev|
|000010b0| 65 6c 20 6f 66 20 51 75 | 69 63 6b 44 72 61 77 20 |el of Qu|ickDraw |
|000010c0| 47 58 20 73 75 70 70 6f | 72 74 20 74 68 61 74 20 |GX suppo|rt that |
|000010d0| 79 6f 75 20 73 68 6f 75 | 6c 64 20 73 65 74 20 79 |you shou|ld set y|
|000010e0| 6f 75 72 20 73 69 67 68 | 74 73 20 6f 6e 20 d1 20 |our sigh|ts on . |
|000010f0| 6a 75 73 74 20 66 6f 6c | 6c 6f 77 20 74 68 65 20 |just fol|low the |
|00001100| 67 75 69 64 65 6c 69 6e | 65 73 20 69 6e 20 74 68 |guidelin|es in th|
|00001110| 69 73 20 61 72 74 69 63 | 6c 65 2e 0d 41 20 51 75 |is artic|le..A Qu|
|00001120| 69 63 6b 44 72 61 77 20 | 47 58 d0 61 77 61 72 65 |ickDraw |GX.aware|
|00001130| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 20 69 73 20 | applica|tion is |
|00001140| 72 65 61 6c 6c 79 20 61 | 20 6e 6f 6e d0 51 75 69 |really a| non.Qui|
|00001150| 63 6b 44 72 61 77 20 47 | 58 20 61 70 70 6c 69 63 |ckDraw G|X applic|
|00001160| 61 74 69 6f 6e 20 61 74 | 20 68 65 61 72 74 2c 20 |ation at| heart, |
|00001170| 77 69 74 68 20 73 75 70 | 70 6f 72 74 20 66 6f 72 |with sup|port for|
|00001180| 20 51 75 69 63 6b 44 72 | 61 77 20 47 58 20 70 72 | QuickDr|aw GX pr|
|00001190| 69 6e 74 69 6e 67 20 61 | 64 64 65 64 2e 20 54 68 |inting a|dded. Th|
|000011a0| 69 73 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 20 73 |is appli|cation s|
|000011b0| 74 69 6c 6c 20 75 73 65 | 73 20 69 74 73 20 6f 6c |till use|s its ol|
|000011c0| 64 20 51 75 69 63 6b 44 | 72 61 77 20 63 6f 6d 6d |d QuickD|raw comm|
|000011d0| 61 6e 64 73 20 74 6f 20 | 72 65 70 72 65 73 65 6e |ands to |represen|
|000011e0| 74 20 73 68 61 70 65 73 | 20 61 6e 64 20 74 65 78 |t shapes| and tex|
|000011f0| 74 3b 20 68 6f 77 65 76 | 65 72 2c 20 69 6e 20 69 |t; howev|er, in i|
|00001200| 74 73 20 70 72 69 6e 74 | 20 6c 6f 6f 70 2c 20 74 |ts print| loop, t|
|00001210| 68 65 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 20 75 |he appli|cation u|
|00001220| 73 65 73 20 74 68 65 20 | 51 75 69 63 6b 44 72 61 |ses the |QuickDra|
|00001230| 77 20 47 58 20 67 72 61 | 70 68 69 63 73 20 74 72 |w GX gra|phics tr|
|00001240| 61 6e 73 6c 61 74 6f 72 | 20 74 6f 20 74 72 61 6e |anslator| to tran|
|00001250| 73 6c 61 74 65 20 51 75 | 69 63 6b 44 72 61 77 20 |slate Qu|ickDraw |
|00001260| 63 6f 6d 6d 61 6e 64 73 | 20 69 6e 74 6f 20 51 75 |commands| into Qu|
|00001270| 69 63 6b 44 72 61 77 20 | 47 58 20 73 68 61 70 65 |ickDraw |GX shape|
|00001280| 73 20 66 6f 72 20 70 72 | 69 6e 74 69 6e 67 2c 20 |s for pr|inting, |
|00001290| 69 66 20 51 75 69 63 6b | 44 72 61 77 20 47 58 20 |if Quick|Draw GX |
|000012a0| 69 73 20 61 76 61 69 6c | 61 62 6c 65 2e 0d 49 66 |is avail|able..If|
|000012b0| 20 79 6f 75 d5 72 65 20 | 6a 75 73 74 20 73 74 61 | you.re |just sta|
|000012c0| 72 74 69 6e 67 20 6f 75 | 74 20 6f 6e 20 61 20 6e |rting ou|t on a n|
|000012d0| 65 77 20 70 72 6f 6a 65 | 63 74 2c 20 6f 72 20 79 |ew proje|ct, or y|
|000012e0| 6f 75 d5 72 65 20 69 6e | 20 74 68 65 20 70 72 6f |ou.re in| the pro|
|000012f0| 63 65 73 73 20 6f 66 20 | 72 65 77 72 69 74 69 6e |cess of |rewritin|
|00001300| 67 20 61 6e 20 65 78 69 | 73 74 69 6e 67 20 70 72 |g an exi|sting pr|
|00001310| 6f 64 75 63 74 2c 20 79 | 6f 75 20 73 68 6f 75 6c |oduct, y|ou shoul|
|00001320| 64 20 63 6f 6e 73 69 64 | 65 72 20 74 68 65 20 6e |d consid|er the n|
|00001330| 65 78 74 20 6c 65 76 65 | 6c 20 6f 66 20 63 6f 6d |ext leve|l of com|
|00001340| 70 61 74 69 62 69 6c 69 | 74 79 3a 20 51 75 69 63 |patibili|ty: Quic|
|00001350| 6b 44 72 61 77 20 47 58 | 20 73 61 76 76 79 2e 20 |kDraw GX| savvy. |
|00001360| 41 20 51 75 69 63 6b 44 | 72 61 77 20 47 58 d0 73 |A QuickD|raw GX.s|
|00001370| 61 76 76 79 20 61 70 70 | 6c 69 63 61 74 69 6f 6e |avvy app|lication|
|00001380| 20 6d 65 65 74 73 20 74 | 68 65 20 72 65 71 75 69 | meets t|he requi|
|00001390| 72 65 6d 65 6e 74 73 20 | 66 6f 72 20 62 65 69 6e |rements |for bein|
|000013a0| 67 20 51 75 69 63 6b 44 | 72 61 77 20 47 58 20 61 |g QuickD|raw GX a|
|000013b0| 77 61 72 65 20 62 75 74 | 20 61 6c 73 6f 20 74 61 |ware but| also ta|
|000013c0| 6b 65 73 20 61 64 76 61 | 6e 74 61 67 65 20 6f 66 |kes adva|ntage of|
|000013d0| 20 74 68 65 20 65 78 74 | 65 6e 73 69 76 65 20 51 | the ext|ensive Q|
|000013e0| 75 69 63 6b 44 72 61 77 | 20 47 58 20 67 72 61 70 |uickDraw| GX grap|
|000013f0| 68 69 63 73 20 61 6e 64 | 20 74 79 70 6f 67 72 61 |hics and| typogra|
|00001400| 70 68 79 20 74 6f 6f 6c | 73 2e 20 59 6f 75 20 6d |phy tool|s. You m|
|00001410| 61 79 20 66 65 65 6c 20 | 74 68 61 74 20 62 65 63 |ay feel |that bec|
|00001420| 6f 6d 69 6e 67 20 51 75 | 69 63 6b 44 72 61 77 20 |oming Qu|ickDraw |
|00001430| 47 58 20 73 61 76 76 79 | 2c 20 61 6c 74 68 6f 75 |GX savvy|, althou|
|00001440| 67 68 20 69 74 20 62 72 | 69 6e 67 73 20 77 69 74 |gh it br|ings wit|
|00001450| 68 20 69 74 20 61 20 77 | 65 61 6c 74 68 20 6f 66 |h it a w|ealth of|
|00001460| 20 69 6e 63 72 65 61 73 | 65 64 20 63 61 70 61 62 | increas|ed capab|
|00001470| 69 6c 69 74 69 65 73 2c | 20 69 73 20 74 6f 6f 20 |ilities,| is too |
|00001480| 62 69 67 20 61 20 6c 65 | 61 70 20 74 6f 20 74 61 |big a le|ap to ta|
|00001490| 6b 65 20 69 6e 20 74 68 | 65 20 73 68 6f 72 74 20 |ke in th|e short |
|000014a0| 74 65 72 6d 2e 20 49 6e | 20 74 68 61 74 20 63 61 |term. In| that ca|
|000014b0| 73 65 2c 20 63 6f 6e 73 | 69 64 65 72 20 6d 61 6b |se, cons|ider mak|
|000014c0| 69 6e 67 20 79 6f 75 72 | 20 65 78 69 73 74 69 6e |ing your| existin|
|000014d0| 67 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 73 20 51 |g applic|ations Q|
|000014e0| 75 69 63 6b 44 72 61 77 | 20 47 58 20 61 77 61 72 |uickDraw| GX awar|
|000014f0| 65 20 61 6e 64 2c 20 6f | 6e 63 65 20 74 68 65 79 |e and, o|nce they|
|00001500| d5 72 65 20 72 65 6c 65 | 61 73 65 64 2c 20 67 6f |.re rele|ased, go|
|00001510| 69 6e 67 20 62 61 63 6b | 20 61 6e 64 20 77 6f 72 |ing back| and wor|
|00001520| 6b 69 6e 67 20 6f 6e 20 | 51 75 69 63 6b 44 72 61 |king on |QuickDra|
|00001530| 77 20 47 58 d0 73 61 76 | 76 79 20 76 65 72 73 69 |w GX.sav|vy versi|
|00001540| 6f 6e 73 2e 20 0d 41 20 | 57 4f 52 44 20 41 42 4f |ons. .A |WORD ABO|
|00001550| 55 54 20 43 4f 4d 50 41 | 54 49 42 49 4c 49 54 59 |UT COMPA|TIBILITY|
|00001560| 20 0d 49 74 d5 73 20 41 | 70 70 6c 65 d5 73 20 68 | .It.s A|pple.s h|
|00001570| 6f 70 65 20 61 6e 64 20 | 67 6f 61 6c 20 74 68 61 |ope and |goal tha|
|00001580| 74 20 6e 6f 20 51 75 69 | 63 6b 44 72 61 77 20 47 |t no Qui|ckDraw G|
|00001590| 58 d0 75 6e 61 77 61 72 | 65 20 61 70 70 6c 69 63 |X.unawar|e applic|
|000015a0| 61 74 69 6f 6e 73 20 77 | 69 6c 6c 20 62 65 20 69 |ations w|ill be i|
|000015b0| 6e 63 6f 6d 70 61 74 69 | 62 6c 65 20 77 69 74 68 |ncompati|ble with|
|000015c0| 20 51 75 69 63 6b 44 72 | 61 77 20 47 58 2e 20 41 | QuickDr|aw GX. A|
|000015d0| 6e 20 65 78 69 73 74 69 | 6e 67 20 61 70 70 6c 69 |n existi|ng appli|
|000015e0| 63 61 74 69 6f 6e 20 63 | 61 6e 20 62 65 20 69 6e |cation c|an be in|
|000015f0| 63 6f 6d 70 61 74 69 62 | 6c 65 20 6f 6e 6c 79 20 |compatib|le only |
|00001600| 69 66 20 69 74 20 72 65 | 6c 69 65 73 20 6f 6e 20 |if it re|lies on |
|00001610| 75 6e 73 75 70 70 6f 72 | 74 65 64 20 6d 65 74 68 |unsuppor|ted meth|
|00001620| 6f 64 73 20 6f 72 20 6f | 6e 20 75 6e 70 75 62 6c |ods or o|n unpubl|
|00001630| 69 73 68 65 64 20 69 6e | 66 6f 72 6d 61 74 69 6f |ished in|formatio|
|00001640| 6e 20 74 68 61 74 20 62 | 72 65 61 6b 73 20 75 6e |n that b|reaks un|
|00001650| 64 65 72 20 51 75 69 63 | 6b 44 72 61 77 20 47 58 |der Quic|kDraw GX|
|00001660| 2e 20 46 6f 72 20 70 72 | 69 6e 74 69 6e 67 2c 20 |. For pr|inting, |
|00001670| 74 68 69 73 20 77 6f 75 | 6c 64 20 69 6e 63 6c 75 |this wou|ld inclu|
|00001680| 64 65 20 74 68 69 6e 67 | 73 20 73 75 63 68 20 61 |de thing|s such a|
|00001690| 73 20 74 72 79 69 6e 67 | 20 74 6f 20 61 63 63 65 |s trying| to acce|
|000016a0| 73 73 20 74 68 65 20 50 | 72 69 6e 74 65 72 20 41 |ss the P|rinter A|
|000016b0| 63 63 65 73 73 20 50 72 | 6f 74 6f 63 6f 6c 20 28 |ccess Pr|otocol (|
|000016c0| 50 41 50 29 20 63 6f 64 | 65 20 66 72 6f 6d 20 74 |PAP) cod|e from t|
|000016d0| 68 65 20 27 50 44 45 46 | 27 20 31 30 20 72 65 73 |he 'PDEF|' 10 res|
|000016e0| 6f 75 72 63 65 20 6f 66 | 20 74 68 65 20 4c 61 73 |ource of| the Las|
|000016f0| 65 72 57 72 69 74 65 72 | 20 64 72 69 76 65 72 2e |erWriter| driver.|
|00001700| 20 54 68 65 20 51 75 69 | 63 6b 44 72 61 77 20 47 | The Qui|ckDraw G|
|00001710| 58 20 4c 61 73 65 72 57 | 72 69 74 65 72 20 64 72 |X LaserW|riter dr|
|00001720| 69 76 65 72 20 64 6f 65 | 73 6e d5 74 20 63 6f 6e |iver doe|sn.t con|
|00001730| 74 61 69 6e 20 61 20 27 | 50 44 45 46 27 20 31 30 |tain a '|PDEF' 10|
|00001740| 20 72 65 73 6f 75 72 63 | 65 2c 20 73 6f 20 61 70 | resourc|e, so ap|
|00001750| 70 6c 69 63 61 74 69 6f | 6e 73 20 74 68 61 74 20 |plicatio|ns that |
|00001760| 72 65 6c 79 20 6f 6e 20 | 74 68 69 73 20 61 70 70 |rely on |this app|
|00001770| 72 6f 61 63 68 20 6d 75 | 73 74 20 62 65 20 6d 6f |roach mu|st be mo|
|00001780| 64 69 66 69 65 64 20 74 | 6f 20 77 6f 72 6b 20 77 |dified t|o work w|
|00001790| 69 74 68 20 51 75 69 63 | 6b 44 72 61 77 20 47 58 |ith Quic|kDraw GX|
|000017a0| 2e 20 20 0d 44 65 76 65 | 6c 6f 70 65 72 73 20 77 |. .Deve|lopers w|
|000017b0| 65 72 65 20 77 61 72 6e | 65 64 20 61 62 6f 75 74 |ere warn|ed about|
|000017c0| 20 74 68 65 20 64 69 73 | 61 70 70 65 61 72 61 6e | the dis|appearan|
|000017d0| 63 65 20 6f 66 20 74 68 | 65 20 27 50 44 45 46 27 |ce of th|e 'PDEF'|
|000017e0| 20 31 30 20 72 65 73 6f | 75 72 63 65 20 69 6e 20 | 10 reso|urce in |
|000017f0| d2 50 72 69 6e 74 20 48 | 69 6e 74 73 3a 20 4c 6f |.Print H|ints: Lo|
|00001800| 6f 6b 69 6e 67 20 41 68 | 65 61 64 20 74 6f 20 51 |oking Ah|ead to Q|
|00001810| 75 69 63 6b 44 72 61 77 | 20 47 58 d3 20 69 6e 20 |uickDraw| GX. in |
|00001820| 64 65 76 65 6c 6f 70 20 | 49 73 73 75 65 20 31 33 |develop |Issue 13|
|00001830| 2e a5 0d 49 66 20 79 6f | 75 72 20 61 70 70 6c 69 |...If yo|ur appli|
|00001840| 63 61 74 69 6f 6e 20 68 | 61 73 20 63 6f 6d 70 61 |cation h|as compa|
|00001850| 74 69 62 69 6c 69 74 79 | 20 70 72 6f 62 6c 65 6d |tibility| problem|
|00001860| 73 20 77 69 74 68 20 51 | 75 69 63 6b 44 72 61 77 |s with Q|uickDraw|
|00001870| 20 47 58 2c 20 79 6f 75 | 20 70 72 6f 62 61 62 6c | GX, you| probabl|
|00001880| 79 20 61 6c 72 65 61 64 | 79 20 73 75 73 70 65 63 |y alread|y suspec|
|00001890| 74 20 69 74 2e 20 59 6f | 75 d5 72 65 20 61 20 63 |t it. Yo|u.re a c|
|000018a0| 61 6e 64 69 64 61 74 65 | 20 66 6f 72 20 73 75 63 |andidate| for suc|
|000018b0| 68 20 70 72 6f 62 6c 65 | 6d 73 20 69 66 20 79 6f |h proble|ms if yo|
|000018c0| 75 d5 72 65 20 70 65 72 | 70 65 74 72 61 74 69 6e |u.re per|petratin|
|000018d0| 67 20 61 6e 79 20 6f 66 | 20 74 68 65 20 d2 70 72 |g any of| the .pr|
|000018e0| 69 6e 74 69 6e 67 20 63 | 72 69 6d 65 73 d3 20 6f |inting c|rimes. o|
|000018f0| 72 20 73 68 61 6b 79 20 | 6d 65 74 68 6f 64 73 20 |r shaky |methods |
|00001900| 74 68 61 74 20 41 70 70 | 6c 65 20 68 61 73 20 77 |that App|le has w|
|00001910| 61 72 6e 65 64 20 61 62 | 6f 75 74 20 69 6e 20 74 |arned ab|out in t|
|00001920| 68 65 20 70 61 73 74 2e | 20 53 77 65 61 74 79 20 |he past.| Sweaty |
|00001930| 70 61 6c 6d 73 20 61 6e | 64 20 70 61 6e 67 73 20 |palms an|d pangs |
|00001940| 6f 66 20 67 75 69 6c 74 | 20 77 68 65 6e 65 76 65 |of guilt| wheneve|
|00001950| 72 20 79 6f 75 72 20 61 | 70 70 6c 69 63 61 74 69 |r your a|pplicati|
|00001960| 6f 6e 20 69 73 20 74 65 | 73 74 65 64 20 75 6e 64 |on is te|sted und|
|00001970| 65 72 20 6e 65 77 20 73 | 79 73 74 65 6d 20 73 6f |er new s|ystem so|
|00001980| 66 74 77 61 72 65 20 61 | 72 65 20 6c 69 6b 65 6c |ftware a|re likel|
|00001990| 79 20 69 6e 64 69 63 61 | 74 69 6f 6e 73 20 74 68 |y indica|tions th|
|000019a0| 61 74 20 79 6f 75 20 73 | 68 6f 75 6c 64 20 67 65 |at you s|hould ge|
|000019b0| 74 20 6f 75 74 20 79 6f | 75 72 20 64 65 76 65 6c |t out yo|ur devel|
|000019c0| 6f 70 6d 65 6e 74 20 74 | 6f 6f 6c 73 20 61 6e 64 |opment t|ools and|
|000019d0| 20 72 65 66 6f 72 6d 20 | 79 6f 75 72 20 63 6f 64 | reform |your cod|
|000019e0| 65 20 6e 6f 77 2e 20 28 | 49 66 20 79 6f 75 20 6e |e now. (|If you n|
|000019f0| 65 65 64 20 74 68 65 20 | 6f 6c 64 20 63 6f 64 65 |eed the |old code|
|00001a00| 20 74 6f 20 72 75 6e 20 | 6f 6e 20 6e 6f 6e d0 51 | to run |on non.Q|
|00001a10| 75 69 63 6b 44 72 61 77 | 20 47 58 20 73 79 73 74 |uickDraw| GX syst|
|00001a20| 65 6d 73 2c 20 73 69 6d | 70 6c 79 20 70 72 6f 76 |ems, sim|ply prov|
|00001a30| 69 64 65 20 61 6c 74 65 | 72 6e 61 74 69 76 65 20 |ide alte|rnative |
|00001a40| 63 6f 64 65 20 66 6f 72 | 20 72 75 6e 6e 69 6e 67 |code for| running|
|00001a50| 20 77 69 74 68 20 51 75 | 69 63 6b 44 72 61 77 20 | with Qu|ickDraw |
|00001a60| 47 58 2e 29 20 44 65 6c | 76 65 20 69 6e 74 6f 20 |GX.) Del|ve into |
|00001a70| 74 68 65 20 51 75 69 63 | 6b 44 72 61 77 20 47 58 |the Quic|kDraw GX|
|00001a80| 20 41 50 49 20 d1 20 79 | 6f 75 d5 72 65 20 73 75 | API . y|ou.re su|
|00001a90| 72 65 20 74 6f 20 66 69 | 6e 64 20 61 20 62 65 74 |re to fi|nd a bet|
|00001aa0| 74 65 72 20 77 61 79 20 | 6f 66 20 64 6f 69 6e 67 |ter way |of doing|
|00001ab0| 20 74 68 69 6e 67 73 2e | 0d 53 4f 4d 45 20 46 55 | things.|.SOME FU|
|00001ac0| 4e 44 41 4d 45 4e 54 41 | 4c 53 0d 42 65 66 6f 72 |NDAMENTA|LS.Befor|
|00001ad0| 65 20 77 65 20 67 6f 20 | 69 6e 74 6f 20 74 68 65 |e we go |into the|
|00001ae0| 20 73 70 65 63 69 66 69 | 63 73 20 6f 66 20 68 6f | specifi|cs of ho|
|00001af0| 77 20 74 6f 20 61 64 64 | 20 51 75 69 63 6b 44 72 |w to add| QuickDr|
|00001b00| 61 77 20 47 58 20 70 72 | 69 6e 74 69 6e 67 20 74 |aw GX pr|inting t|
|00001b10| 6f 20 79 6f 75 72 20 65 | 78 69 73 74 69 6e 67 20 |o your e|xisting |
|00001b20| 61 70 70 6c 69 63 61 74 | 69 6f 6e 73 2c 20 77 65 |applicat|ions, we|
|00001b30| 20 6e 65 65 64 20 74 6f | 20 63 6f 76 65 72 20 73 | need to| cover s|
|00001b40| 6f 6d 65 20 66 75 6e 64 | 61 6d 65 6e 74 61 6c 20 |ome fund|amental |
|00001b50| 69 64 65 61 73 2e 20 49 | d5 6c 6c 20 73 74 61 72 |ideas. I|.ll star|
|00001b60| 74 20 77 69 74 68 20 61 | 20 64 69 73 63 75 73 73 |t with a| discuss|
|00001b70| 69 6f 6e 20 6f 66 20 74 | 68 65 20 43 6f 6c 6c 65 |ion of t|he Colle|
|00001b80| 63 74 69 6f 6e 20 4d 61 | 6e 61 67 65 72 2c 20 77 |ction Ma|nager, w|
|00001b90| 68 69 63 68 20 6d 61 6b | 65 73 20 69 74 73 20 64 |hich mak|es its d|
|00001ba0| 65 62 75 74 20 77 69 74 | 68 20 51 75 69 63 6b 44 |ebut wit|h QuickD|
|00001bb0| 72 61 77 20 47 58 2c 20 | 61 6e 64 20 74 68 65 6e |raw GX, |and then|
|00001bc0| 20 62 72 69 65 66 6c 79 | 20 63 6f 76 65 72 20 6f | briefly| cover o|
|00001bd0| 76 65 72 72 69 64 69 6e | 67 20 6d 65 73 73 61 67 |verridin|g messag|
|00001be0| 65 73 20 61 6e 64 20 74 | 68 65 20 4d 65 73 73 61 |es and t|he Messa|
|00001bf0| 67 65 20 4d 61 6e 61 67 | 65 72 2e 0d 46 6f 72 20 |ge Manag|er..For |
|00001c00| 61 20 72 65 76 69 65 77 | 20 6f 66 20 51 75 69 63 |a review| of Quic|
|00001c10| 6b 44 72 61 77 20 47 58 | 20 70 72 69 6e 74 69 6e |kDraw GX| printin|
|00001c20| 67 2c 20 73 65 65 20 d2 | 47 65 74 74 69 6e 67 20 |g, see .|Getting |
|00001c30| 53 74 61 72 74 65 64 20 | 57 69 74 68 20 51 75 69 |Started |With Qui|
|00001c40| 63 6b 44 72 61 77 20 47 | 58 d3 20 61 6e 64 20 d2 |ckDraw G|X. and .|
|00001c50| 44 65 76 65 6c 6f 70 69 | 6e 67 20 51 75 69 63 6b |Developi|ng Quick|
|00001c60| 44 72 61 77 20 47 58 20 | 50 72 69 6e 74 69 6e 67 |Draw GX |Printing|
|00001c70| 20 45 78 74 65 6e 73 69 | 6f 6e 73 2c d3 20 62 6f | Extensi|ons,. bo|
|00001c80| 74 68 20 69 6e 20 64 65 | 76 65 6c 6f 70 20 49 73 |th in de|velop Is|
|00001c90| 73 75 65 20 31 35 2e 20 | 53 65 65 20 61 6c 73 6f |sue 15. |See also|
|00001ca0| 20 49 6e 73 69 64 65 20 | 4d 61 63 69 6e 74 6f 73 | Inside |Macintos|
|00001cb0| 68 3a 20 51 75 69 63 6b | 44 72 61 77 20 47 58 20 |h: Quick|Draw GX |
|00001cc0| 50 72 69 6e 74 69 6e 67 | 2e a5 0d 43 52 45 41 54 |Printing|...CREAT|
|00001cd0| 49 4e 47 20 41 20 46 4f | 55 4e 44 41 54 49 4f 4e |ING A FO|UNDATION|
|00001ce0| 20 54 4f 20 42 55 49 4c | 44 20 4f 4e 3a 20 54 48 | TO BUIL|D ON: TH|
|00001cf0| 45 20 43 4f 4c 4c 45 43 | 54 49 4f 4e 20 4d 41 4e |E COLLEC|TION MAN|
|00001d00| 41 47 45 52 0d 54 68 65 | 20 43 6f 6c 6c 65 63 74 |AGER.The| Collect|
|00001d10| 69 6f 6e 20 4d 61 6e 61 | 67 65 72 20 69 73 20 73 |ion Mana|ger is s|
|00001d20| 6f 6d 65 77 68 61 74 20 | 6c 69 6b 65 20 61 20 6d |omewhat |like a m|
|00001d30| 65 6d 6f 72 79 2d 62 61 | 73 65 64 20 76 65 72 73 |emory-ba|sed vers|
|00001d40| 69 6f 6e 20 6f 66 20 74 | 68 65 20 52 65 73 6f 75 |ion of t|he Resou|
|00001d50| 72 63 65 20 4d 61 6e 61 | 67 65 72 2e 20 49 74 20 |rce Mana|ger. It |
|00001d60| 70 72 6f 76 69 64 65 73 | 20 41 50 49 20 63 61 6c |provides| API cal|
|00001d70| 6c 73 20 74 68 61 74 20 | 61 6c 6c 6f 77 20 79 6f |ls that |allow yo|
|00001d80| 75 20 74 6f 20 63 72 65 | 61 74 65 20 61 6e 64 20 |u to cre|ate and |
|00001d90| 61 63 63 65 73 73 20 63 | 6f 6c 6c 65 63 74 69 6f |access c|ollectio|
|00001da0| 6e 73 2c 20 77 68 69 63 | 68 20 61 72 65 20 61 6d |ns, whic|h are am|
|00001db0| 6f 72 70 68 6f 75 73 20 | 73 74 72 75 63 74 75 72 |orphous |structur|
|00001dc0| 65 73 20 74 68 61 74 20 | 63 61 6e 20 63 6f 6e 74 |es that |can cont|
|00001dd0| 61 69 6e 20 64 61 74 61 | 20 6f 66 20 64 69 66 66 |ain data| of diff|
|00001de0| 65 72 65 6e 74 20 74 79 | 70 65 73 20 77 69 74 68 |erent ty|pes with|
|00001df0| 20 64 69 66 66 65 72 65 | 6e 74 20 73 69 7a 65 73 | differe|nt sizes|
|00001e00| 2e 20 43 6f 6c 6c 65 63 | 74 69 6f 6e 73 20 61 72 |. Collec|tions ar|
|00001e10| 65 20 73 69 6d 69 6c 61 | 72 20 74 6f 20 72 65 73 |e simila|r to res|
|00001e20| 6f 75 72 63 65 20 66 69 | 6c 65 73 20 75 6e 64 65 |ource fi|les unde|
|00001e30| 72 20 74 68 65 20 52 65 | 73 6f 75 72 63 65 20 4d |r the Re|source M|
|00001e40| 61 6e 61 67 65 72 20 65 | 78 63 65 70 74 20 74 68 |anager e|xcept th|
|00001e50| 61 74 20 63 6f 6c 6c 65 | 63 74 69 6f 6e 73 20 6d |at colle|ctions m|
|00001e60| 75 73 74 20 62 65 20 69 | 6e 20 6d 65 6d 6f 72 79 |ust be i|n memory|
|00001e70| 2c 20 77 68 69 6c 65 20 | 72 65 73 6f 75 72 63 65 |, while |resource|
|00001e80| 20 66 69 6c 65 73 20 61 | 72 65 20 62 79 20 64 65 | files a|re by de|
|00001e90| 66 69 6e 69 74 69 6f 6e | 20 64 69 73 6b 20 62 61 |finition| disk ba|
|00001ea0| 73 65 64 2e 20 52 6f 75 | 74 69 6e 65 73 20 65 78 |sed. Rou|tines ex|
|00001eb0| 69 73 74 20 66 6f 72 20 | d2 66 6c 61 74 74 65 6e |ist for |.flatten|
|00001ec0| 69 6e 67 d3 20 63 6f 6c | 6c 65 63 74 69 6f 6e 73 |ing. col|lections|
|00001ed0| 20 69 6e 74 6f 20 61 20 | 73 65 72 69 65 73 20 6f | into a |series o|
|00001ee0| 66 20 62 79 74 65 73 20 | 74 68 61 74 20 63 61 6e |f bytes |that can|
|00001ef0| 20 62 65 20 77 72 69 74 | 74 65 6e 20 74 6f 20 64 | be writ|ten to d|
|00001f00| 69 73 6b 20 61 6e 64 20 | 66 6f 72 20 d2 75 6e 66 |isk and |for .unf|
|00001f10| 6c 61 74 74 65 6e 69 6e | 67 d3 20 74 68 65 6d 20 |lattenin|g. them |
|00001f20| 66 6f 72 20 6c 61 74 65 | 72 20 75 73 65 2e 20 0d |for late|r use. .|
|00001f30| 4a 75 73 74 20 61 73 20 | 61 20 72 65 73 6f 75 72 |Just as |a resour|
|00001f40| 63 65 20 66 69 6c 65 20 | 6d 61 79 20 63 6f 6e 74 |ce file |may cont|
|00001f50| 61 69 6e 20 41 70 70 6c | 65 2d 64 65 66 69 6e 65 |ain Appl|e-define|
|00001f60| 64 20 64 61 74 61 20 73 | 74 72 75 63 74 75 72 65 |d data s|tructure|
|00001f70| 73 20 73 75 63 68 20 61 | 73 20 27 57 49 4e 44 27 |s such a|s 'WIND'|
|00001f80| 20 61 6e 64 20 27 4d 45 | 4e 55 27 20 72 65 73 6f | and 'ME|NU' reso|
|00001f90| 75 72 63 65 73 2c 20 61 | 20 63 6f 6c 6c 65 63 74 |urces, a| collect|
|00001fa0| 69 6f 6e 20 6d 61 79 20 | 63 6f 6e 74 61 69 6e 20 |ion may |contain |
|00001fb0| 70 72 65 64 65 66 69 6e | 65 64 20 63 6f 6c 6c 65 |predefin|ed colle|
|00001fc0| 63 74 69 6f 6e 20 69 74 | 65 6d 73 20 73 75 63 68 |ction it|ems such|
|00001fd0| 20 61 73 20 27 63 6f 70 | 79 27 20 61 6e 64 20 27 | as 'cop|y' and '|
|00001fe0| 72 61 6e 67 27 2c 20 77 | 68 69 63 68 20 73 70 65 |rang', w|hich spe|
|00001ff0| 63 69 66 79 20 74 68 65 | 20 6e 75 6d 62 65 72 20 |cify the| number |
|00002000| 6f 66 20 63 6f 70 69 65 | 73 20 6f 66 20 61 20 70 |of copie|s of a p|
|00002010| 72 69 6e 74 20 6a 6f 62 | 20 61 6e 64 20 74 68 65 |rint job| and the|
|00002020| 20 70 61 67 65 20 72 61 | 6e 67 65 20 6f 66 20 61 | page ra|nge of a|
|00002030| 20 70 72 69 6e 74 20 6a | 6f 62 2c 20 72 65 73 70 | print j|ob, resp|
|00002040| 65 63 74 69 76 65 6c 79 | 2e 20 4c 69 6b 65 20 72 |ectively|. Like r|
|00002050| 65 73 6f 75 72 63 65 73 | 2c 20 63 6f 6c 6c 65 63 |esources|, collec|
|00002060| 74 69 6f 6e 20 69 74 65 | 6d 73 20 68 61 76 65 20 |tion ite|ms have |
|00002070| 61 74 74 72 69 62 75 74 | 65 73 20 74 68 61 74 20 |attribut|es that |
|00002080| 61 72 65 20 70 72 65 64 | 65 66 69 6e 65 64 20 28 |are pred|efined (|
|00002090| 66 6f 72 20 65 78 61 6d | 70 6c 65 2c 20 74 68 65 |for exam|ple, the|
|000020a0| 20 63 6f 6c 6c 65 63 74 | 69 6f 6e 4c 6f 63 6b 4d | collect|ionLockM|
|000020b0| 61 73 6b 20 61 74 74 72 | 69 62 75 74 65 29 2c 20 |ask attr|ibute), |
|000020c0| 62 75 74 20 75 6e 6c 69 | 6b 65 20 72 65 73 6f 75 |but unli|ke resou|
|000020d0| 72 63 65 73 2c 20 74 68 | 65 79 20 61 6c 73 6f 20 |rces, th|ey also |
|000020e0| 68 61 76 65 20 61 74 74 | 72 69 62 75 74 65 73 20 |have att|ributes |
|000020f0| 74 68 61 74 20 63 61 6e | 20 62 65 20 70 72 6f 67 |that can| be prog|
|00002100| 72 61 6d 6d 65 72 20 64 | 65 66 69 6e 65 64 2e 20 |rammer d|efined. |
|00002110| 41 6e 64 2c 20 61 73 20 | 77 69 74 68 20 72 65 73 |And, as |with res|
|00002120| 6f 75 72 63 65 73 2c 20 | 79 6f 75 20 61 72 65 6e |ources, |you aren|
|00002130| d5 74 20 73 69 6d 70 6c | 79 20 73 74 75 63 6b 20 |.t simpl|y stuck |
|00002140| 77 69 74 68 20 74 68 65 | 20 63 6f 72 65 20 73 65 |with the| core se|
|00002150| 74 20 74 68 61 74 d5 73 | 20 62 65 65 6e 20 64 65 |t that.s| been de|
|00002160| 66 69 6e 65 64 20 62 79 | 20 41 70 70 6c 65 2e 20 |fined by| Apple. |
|00002170| 46 69 67 75 72 65 20 32 | 20 69 6c 6c 75 73 74 72 |Figure 2| illustr|
|00002180| 61 74 65 73 20 74 68 65 | 20 73 69 6d 69 6c 61 72 |ates the| similar|
|00002190| 69 74 69 65 73 2c 20 69 | 6e 63 6c 75 64 69 6e 67 |ities, i|ncluding|
|000021a0| 20 61 20 70 72 6f 67 72 | 61 6d 6d 65 72 2d 64 65 | a progr|ammer-de|
|000021b0| 66 69 6e 65 64 20 72 65 | 73 6f 75 72 63 65 20 6f |fined re|source o|
|000021c0| 66 20 74 79 70 65 20 27 | 55 53 45 52 27 20 61 6e |f type '|USER' an|
|000021d0| 64 20 61 20 70 72 6f 67 | 72 61 6d 6d 65 72 2d 64 |d a prog|rammer-d|
|000021e0| 65 66 69 6e 65 64 20 63 | 6f 6c 6c 65 63 74 69 6f |efined c|ollectio|
|000021f0| 6e 20 69 74 65 6d 2c 20 | 61 6c 73 6f 20 6f 66 20 |n item, |also of |
|00002200| 74 79 70 65 20 27 55 53 | 45 52 27 2e 0d 46 69 67 |type 'US|ER'..Fig|
|00002210| 75 72 65 20 32 2e 20 53 | 69 6d 69 6c 61 72 69 74 |ure 2. S|imilarit|
|00002220| 69 65 73 20 62 65 74 77 | 65 65 6e 20 72 65 73 6f |ies betw|een reso|
|00002230| 75 72 63 65 73 20 61 6e | 64 20 63 6f 6c 6c 65 63 |urces an|d collec|
|00002240| 74 69 6f 6e 20 69 74 65 | 6d 73 0d 49 74 65 6d 73 |tion ite|ms.Items|
|00002250| 20 69 6e 20 61 20 63 6f | 6c 6c 65 63 74 69 6f 6e | in a co|llection|
|00002260| 20 61 72 65 20 75 6e 69 | 71 75 65 6c 79 20 69 64 | are uni|quely id|
|00002270| 65 6e 74 69 66 69 65 64 | 20 69 6e 20 74 68 72 65 |entified| in thre|
|00002280| 65 20 64 69 66 66 65 72 | 65 6e 74 20 77 61 79 73 |e differ|ent ways|
|00002290| 2e 20 45 76 65 72 79 20 | 69 74 65 6d 20 68 61 73 |. Every |item has|
|000022a0| 20 61 20 34 2d 63 68 61 | 72 61 63 74 65 72 20 6c | a 4-cha|racter l|
|000022b0| 61 62 65 6c 2c 20 6f 72 | 20 74 61 67 2c 20 77 68 |abel, or| tag, wh|
|000022c0| 69 63 68 20 69 64 65 6e | 74 69 66 69 65 73 20 74 |ich iden|tifies t|
|000022d0| 68 65 20 74 79 70 65 20 | 6f 66 20 63 6f 6c 6c 65 |he type |of colle|
|000022e0| 63 74 69 6f 6e 20 69 74 | 65 6d 2e 20 49 6e 20 46 |ction it|em. In F|
|000022f0| 69 67 75 72 65 20 32 2c | 20 74 68 65 72 65 20 61 |igure 2,| there a|
|00002300| 72 65 20 74 68 72 65 65 | 20 63 6f 6c 6c 65 63 74 |re three| collect|
|00002310| 69 6f 6e 20 69 74 65 6d | 73 20 68 61 76 69 6e 67 |ion item|s having|
|00002320| 20 74 68 65 20 74 61 67 | 73 20 27 55 53 45 52 27 | the tag|s 'USER'|
|00002330| 2c 20 27 63 6f 70 79 27 | 2c 20 61 6e 64 20 27 72 |, 'copy'|, and 'r|
|00002340| 61 6e 67 27 2c 20 72 65 | 73 70 65 63 74 69 76 65 |ang', re|spective|
|00002350| 6c 79 2e 20 49 6e 20 61 | 64 64 69 74 69 6f 6e 20 |ly. In a|ddition |
|00002360| 74 6f 20 74 68 65 20 74 | 61 67 2c 20 65 76 65 72 |to the t|ag, ever|
|00002370| 79 20 63 6f 6c 6c 65 63 | 74 69 6f 6e 20 69 74 65 |y collec|tion ite|
|00002380| 6d 20 68 61 73 20 61 20 | 6c 6f 6e 67 77 6f 72 64 |m has a |longword|
|00002390| 20 49 44 2e 20 54 6f 67 | 65 74 68 65 72 2c 20 74 | ID. Tog|ether, t|
|000023a0| 68 65 20 74 61 67 20 61 | 6e 64 20 49 44 20 61 72 |he tag a|nd ID ar|
|000023b0| 65 20 6f 6e 65 20 77 61 | 79 20 74 6f 20 75 6e 69 |e one wa|y to uni|
|000023c0| 71 75 65 6c 79 20 69 64 | 65 6e 74 69 66 79 20 61 |quely id|entify a|
|000023d0| 20 63 6f 6c 6c 65 63 74 | 69 6f 6e 20 69 74 65 6d | collect|ion item|
|000023e0| 2e 20 45 61 63 68 20 63 | 6f 6c 6c 65 63 74 69 6f |. Each c|ollectio|
|000023f0| 6e 20 69 74 65 6d 20 63 | 61 6e 20 62 65 20 61 6c |n item c|an be al|
|00002400| 73 6f 20 62 65 20 72 65 | 66 65 72 65 6e 63 65 64 |so be re|ferenced|
|00002410| 20 62 79 20 69 74 73 20 | 63 6f 6c 6c 65 63 74 69 | by its |collecti|
|00002420| 6f 6e 20 69 6e 64 65 78 | 20 6f 72 20 62 79 20 69 |on index| or by i|
|00002430| 74 73 20 74 61 67 20 61 | 6e 64 20 74 61 67 20 6c |ts tag a|nd tag l|
|00002440| 69 73 74 20 70 6f 73 69 | 74 69 6f 6e 2e 20 54 68 |ist posi|tion. Th|
|00002450| 65 20 69 6e 64 65 78 20 | 69 73 20 74 68 65 20 72 |e index |is the r|
|00002460| 65 6c 61 74 69 76 65 20 | 70 6f 73 69 74 69 6f 6e |elative |position|
|00002470| 20 6f 66 20 61 6e 20 69 | 74 65 6d 20 69 6e 20 61 | of an i|tem in a|
|00002480| 20 63 6f 6c 6c 65 63 74 | 69 6f 6e 2c 20 61 6e 64 | collect|ion, and|
|00002490| 20 74 68 65 20 74 61 67 | 20 6c 69 73 74 20 70 6f | the tag| list po|
|000024a0| 73 69 74 69 6f 6e 20 69 | 73 20 74 68 65 20 72 65 |sition i|s the re|
|000024b0| 6c 61 74 69 76 65 20 70 | 6f 73 69 74 69 6f 6e 20 |lative p|osition |
|000024c0| 6f 66 20 61 20 63 6f 6c | 6c 65 63 74 69 6f 6e 20 |of a col|lection |
|000024d0| 69 74 65 6d 20 77 69 74 | 68 69 6e 20 74 68 65 20 |item wit|hin the |
|000024e0| 69 74 65 6d d5 73 20 74 | 61 67 20 74 79 70 65 20 |item.s t|ag type |
|000024f0| d1 20 66 6f 72 20 65 78 | 61 6d 70 6c 65 2c 20 74 |. for ex|ample, t|
|00002500| 68 65 20 66 69 72 73 74 | 2c 20 73 65 63 6f 6e 64 |he first|, second|
|00002510| 2c 20 6f 72 20 74 68 69 | 72 64 20 27 55 53 45 52 |, or thi|rd 'USER|
|00002520| 27 20 69 74 65 6d 20 69 | 6e 20 61 20 63 6f 6c 6c |' item i|n a coll|
|00002530| 65 63 74 69 6f 6e 2e 20 | 54 68 69 73 20 67 69 76 |ection. |This giv|
|00002540| 65 73 20 75 73 20 74 68 | 72 65 65 20 77 61 79 73 |es us th|ree ways|
|00002550| 20 74 6f 20 72 65 66 65 | 72 20 74 6f 20 61 20 73 | to refe|r to a s|
|00002560| 70 65 63 69 66 69 63 20 | 63 6f 6c 6c 65 63 74 69 |pecific |collecti|
|00002570| 6f 6e 20 69 74 65 6d 3a | 20 0d a5 09 62 79 20 69 |on item:| ...by i|
|00002580| 74 73 20 74 61 67 20 61 | 6e 64 20 49 44 0d a5 09 |ts tag a|nd ID...|
|00002590| 62 79 20 69 74 73 20 63 | 6f 6c 6c 65 63 74 69 6f |by its c|ollectio|
|000025a0| 6e 20 69 6e 64 65 78 0d | a5 09 62 79 20 69 74 73 |n index.|..by its|
|000025b0| 20 74 61 67 20 61 6e 64 | 20 74 61 67 20 6c 69 73 | tag and| tag lis|
|000025c0| 74 20 70 6f 73 69 74 69 | 6f 6e 0d 49 74 d5 73 20 |t positi|on.It.s |
|000025d0| 69 6d 70 6f 72 74 61 6e | 74 20 74 6f 20 6e 6f 74 |importan|t to not|
|000025e0| 65 20 74 68 61 74 20 61 | 6c 74 68 6f 75 67 68 20 |e that a|lthough |
|000025f0| 61 20 63 6f 6c 6c 65 63 | 74 69 6f 6e 20 69 74 65 |a collec|tion ite|
|00002600| 6d d5 73 20 69 6e 64 65 | 78 20 61 6e 64 20 74 61 |m.s inde|x and ta|
|00002610| 67 20 6c 69 73 74 20 70 | 6f 73 69 74 69 6f 6e 20 |g list p|osition |
|00002620| 6d 61 79 20 63 68 61 6e | 67 65 20 61 73 20 69 74 |may chan|ge as it|
|00002630| 65 6d 73 20 61 72 65 20 | 61 64 64 65 64 20 6f 72 |ems are |added or|
|00002640| 20 72 65 6d 6f 76 65 64 | 20 66 72 6f 6d 20 61 20 | removed| from a |
|00002650| 63 6f 6c 6c 65 63 74 69 | 6f 6e 2c 20 61 6e 20 69 |collecti|on, an i|
|00002660| 74 65 6d d5 73 20 74 61 | 67 20 61 6e 64 20 49 44 |tem.s ta|g and ID|
|00002670| 20 77 69 6c 6c 20 6e 65 | 76 65 72 20 63 68 61 6e | will ne|ver chan|
|00002680| 67 65 2e 20 54 68 65 72 | 65 66 6f 72 65 2c 20 74 |ge. Ther|efore, t|
|00002690| 68 65 20 6d 6f 73 74 20 | 63 6f 6d 6d 6f 6e 20 77 |he most |common w|
|000026a0| 61 79 20 74 6f 20 72 65 | 66 65 72 20 74 6f 20 63 |ay to re|fer to c|
|000026b0| 6f 6c 6c 65 63 74 69 6f | 6e 20 69 74 65 6d 73 20 |ollectio|n items |
|000026c0| 69 73 20 62 79 20 74 61 | 67 20 61 6e 64 20 49 44 |is by ta|g and ID|
|000026d0| 2e 20 0d 43 6f 6c 6c 65 | 63 74 69 6f 6e 20 74 61 |. .Colle|ction ta|
|000026e0| 67 20 61 6e 64 20 72 65 | 73 6f 75 72 63 65 20 74 |g and re|source t|
|000026f0| 79 70 65 20 6e 61 6d 69 | 6e 67 20 63 6f 6e 76 65 |ype nami|ng conve|
|00002700| 6e 74 69 6f 6e 73 20 61 | 72 65 20 74 68 65 20 73 |ntions a|re the s|
|00002710| 61 6d 65 2e 20 41 70 70 | 6c 65 20 72 65 73 65 72 |ame. App|le reser|
|00002720| 76 65 73 20 74 61 67 73 | 20 6c 69 73 74 65 64 20 |ves tags| listed |
|00002730| 69 6e 20 74 68 65 20 70 | 72 69 6e 74 69 6e 67 20 |in the p|rinting |
|00002740| 69 6e 74 65 72 66 61 63 | 65 20 66 69 6c 65 73 2c |interfac|e files,|
|00002750| 20 61 73 20 77 65 6c 6c | 20 61 73 20 74 68 6f 73 | as well| as thos|
|00002760| 65 20 63 6f 6e 73 69 73 | 74 69 6e 67 20 65 6e 74 |e consis|ting ent|
|00002770| 69 72 65 6c 79 20 6f 66 | 20 6c 6f 77 65 72 63 61 |irely of| lowerca|
|00002780| 73 65 20 6c 65 74 74 65 | 72 73 2e a5 0d 59 6f 75 |se lette|rs...You|
|00002790| 20 63 61 6e 20 65 69 74 | 68 65 72 20 63 72 65 61 | can eit|her crea|
|000027a0| 74 65 20 61 20 63 6f 6c | 6c 65 63 74 69 6f 6e 20 |te a col|lection |
|000027b0| 77 69 74 68 20 74 68 65 | 20 4e 65 77 43 6f 6c 6c |with the| NewColl|
|000027c0| 65 63 74 69 6f 6e 20 72 | 6f 75 74 69 6e 65 20 6f |ection r|outine o|
|000027d0| 72 20 75 73 65 20 6f 6e | 65 20 6f 66 20 74 68 65 |r use on|e of the|
|000027e0| 20 74 68 72 65 65 20 74 | 79 70 65 73 20 6f 66 20 | three t|ypes of |
|000027f0| 63 6f 6c 6c 65 63 74 69 | 6f 6e 73 20 74 68 61 74 |collecti|ons that|
|00002800| 20 51 75 69 63 6b 44 72 | 61 77 20 47 58 20 61 75 | QuickDr|aw GX au|
|00002810| 74 6f 6d 61 74 69 63 61 | 6c 6c 79 20 63 72 65 61 |tomatica|lly crea|
|00002820| 74 65 73 20 66 6f 72 20 | 79 6f 75 20 64 75 72 69 |tes for |you duri|
|00002830| 6e 67 20 70 72 69 6e 74 | 69 6e 67 2e 20 54 68 65 |ng print|ing. The|
|00002840| 73 65 20 74 79 70 65 73 | 20 61 72 65 20 6a 6f 62 |se types| are job|
|00002850| 20 63 6f 6c 6c 65 63 74 | 69 6f 6e 73 2c 20 66 6f | collect|ions, fo|
|00002860| 72 6d 61 74 20 63 6f 6c | 6c 65 63 74 69 6f 6e 73 |rmat col|lections|
|00002870| 2c 20 61 6e 64 20 70 61 | 70 65 72 2d 74 79 70 65 |, and pa|per-type|
|00002880| 20 63 6f 6c 6c 65 63 74 | 69 6f 6e 73 2e 20 45 76 | collect|ions. Ev|
|00002890| 65 72 79 20 74 69 6d 65 | 20 61 20 6e 65 77 20 67 |ery time| a new g|
|000028a0| 78 4a 6f 62 2c 20 67 78 | 46 6f 72 6d 61 74 2c 20 |xJob, gx|Format, |
|000028b0| 6f 72 20 67 78 50 61 70 | 65 72 54 79 70 65 20 6f |or gxPap|erType o|
|000028c0| 62 6a 65 63 74 20 69 73 | 20 63 72 65 61 74 65 64 |bject is| created|
|000028d0| 2c 20 61 20 63 6f 6c 6c | 65 63 74 69 6f 6e 20 69 |, a coll|ection i|
|000028e0| 73 20 61 6c 73 6f 20 63 | 72 65 61 74 65 64 20 66 |s also c|reated f|
|000028f0| 6f 72 20 74 68 61 74 20 | 6f 62 6a 65 63 74 2e 20 |or that |object. |
|00002900| 54 68 65 73 65 20 63 6f | 6c 6c 65 63 74 69 6f 6e |These co|llection|
|00002910| 73 20 63 6f 6e 74 61 69 | 6e 20 69 74 65 6d 73 20 |s contai|n items |
|00002920| 73 70 65 63 69 66 79 69 | 6e 67 20 74 68 65 20 66 |specifyi|ng the f|
|00002930| 6f 6c 6c 6f 77 69 6e 67 | 20 74 79 70 65 73 20 6f |ollowing| types o|
|00002940| 66 20 69 6e 66 6f 72 6d | 61 74 69 6f 6e 3a 20 0d |f inform|ation: .|
|00002950| a5 09 6a 6f 62 20 63 6f | 6c 6c 65 63 74 69 6f 6e |..job co|llection|
|00002960| 3a 20 6e 75 6d 62 65 72 | 20 6f 66 20 63 6f 70 69 |: number| of copi|
|00002970| 65 73 2c 20 70 61 67 65 | 20 72 61 6e 67 65 2c 20 |es, page| range, |
|00002980| 64 65 73 74 69 6e 61 74 | 69 6f 6e 20 66 69 6c 65 |destinat|ion file|
|00002990| 20 69 6e 66 6f 72 6d 61 | 74 69 6f 6e 20 28 69 66 | informa|tion (if|
|000029a0| 20 70 72 69 6e 74 69 6e | 67 20 74 6f 20 61 20 66 | printin|g to a f|
|000029b0| 69 6c 65 29 20 0d a5 09 | 66 6f 72 6d 61 74 20 63 |ile) ...|format c|
|000029c0| 6f 6c 6c 65 63 74 69 6f | 6e 3a 20 73 63 61 6c 69 |ollectio|n: scali|
|000029d0| 6e 67 20 66 61 63 74 6f | 72 2c 20 70 61 67 65 20 |ng facto|r, page |
|000029e0| 6f 72 69 65 6e 74 61 74 | 69 6f 6e 2c 20 70 61 67 |orientat|ion, pag|
|000029f0| 65 20 66 6c 69 70 70 69 | 6e 67 20 69 6e 66 6f 72 |e flippi|ng infor|
|00002a00| 6d 61 74 69 6f 6e 20 20 | 0d a5 09 70 61 70 65 72 |mation |...paper|
|00002a10| 2d 74 79 70 65 20 63 6f | 6c 6c 65 63 74 69 6f 6e |-type co|llection|
|00002a20| 3a 20 70 61 70 65 72 2d | 74 79 70 65 20 63 72 65 |: paper-|type cre|
|00002a30| 61 74 6f 72 2c 20 70 61 | 70 65 72 2d 74 79 70 65 |ator, pa|per-type|
|00002a40| 20 63 6f 6d 6d 65 6e 74 | 20 20 0d 54 68 65 73 65 | comment| .These|
|00002a50| 20 70 72 65 64 65 66 69 | 6e 65 64 20 63 6f 6c 6c | predefi|ned coll|
|00002a60| 65 63 74 69 6f 6e 73 20 | 63 6f 6e 74 61 69 6e 20 |ections |contain |
|00002a70| 6d 61 6e 79 20 6d 6f 72 | 65 20 63 6f 6c 6c 65 63 |many mor|e collec|
|00002a80| 74 69 6f 6e 20 69 74 65 | 6d 73 20 74 68 61 6e 20 |tion ite|ms than |
|00002a90| 61 72 65 20 73 68 6f 77 | 6e 20 68 65 72 65 2e 20 |are show|n here. |
|00002aa0| 53 65 65 20 74 68 65 20 | 51 75 69 63 6b 44 72 61 |See the |QuickDra|
|00002ab0| 77 20 47 58 20 69 6e 74 | 65 72 66 61 63 65 20 66 |w GX int|erface f|
|00002ac0| 69 6c 65 20 50 72 69 6e | 74 69 6e 67 4d 61 6e 61 |ile Prin|tingMana|
|00002ad0| 67 65 72 2e 68 20 66 6f | 72 20 74 68 65 20 63 6f |ger.h fo|r the co|
|00002ae0| 6d 70 6c 65 74 65 20 6c | 69 73 74 69 6e 67 2e 20 |mplete l|isting. |
|00002af0| 42 79 20 73 69 6d 70 6c | 79 20 63 68 61 6e 67 69 |By simpl|y changi|
|00002b00| 6e 67 20 74 68 65 20 63 | 6f 6e 74 65 6e 74 73 20 |ng the c|ontents |
|00002b10| 6f 66 20 74 68 65 20 63 | 6f 6c 6c 65 63 74 69 6f |of the c|ollectio|
|00002b20| 6e 20 69 74 65 6d 73 2c | 20 61 6e 79 20 61 70 70 |n items,| any app|
|00002b30| 6c 69 63 61 74 69 6f 6e | 2c 20 70 72 69 6e 74 69 |lication|, printi|
|00002b40| 6e 67 20 65 78 74 65 6e | 73 69 6f 6e 2c 20 6f 72 |ng exten|sion, or|
|00002b50| 20 70 72 69 6e 74 65 72 | 20 64 72 69 76 65 72 20 | printer| driver |
|00002b60| 63 61 6e 20 65 61 73 69 | 6c 79 20 61 66 66 65 63 |can easi|ly affec|
|00002b70| 74 20 68 6f 77 20 61 20 | 64 6f 63 75 6d 65 6e 74 |t how a |document|
|00002b80| 20 77 69 6c 6c 20 62 65 | 20 70 72 69 6e 74 65 64 | will be| printed|
|00002b90| 2e 0d 4e 6f 74 65 20 74 | 68 61 74 20 61 6c 6c 20 |..Note t|hat all |
|00002ba0| 70 72 65 64 65 66 69 6e | 65 64 20 63 6f 6c 6c 65 |predefin|ed colle|
|00002bb0| 63 74 69 6f 6e 20 69 74 | 65 6d 73 20 68 61 76 65 |ction it|ems have|
|00002bc0| 20 74 68 65 20 49 44 20 | 67 78 50 72 69 6e 74 69 | the ID |gxPrinti|
|00002bd0| 6e 67 54 61 67 49 44 20 | 3d 20 d0 32 38 36 37 32 |ngTagID |= .28672|
|00002be0| 2e a5 0d 59 6f 75 72 20 | 61 70 70 6c 69 63 61 74 |...Your |applicat|
|00002bf0| 69 6f 6e 20 63 61 6e 20 | 63 72 65 61 74 65 20 61 |ion can |create a|
|00002c00| 6e 64 20 75 73 65 20 63 | 6f 6c 6c 65 63 74 69 6f |nd use c|ollectio|
|00002c10| 6e 73 20 66 6f 72 20 69 | 74 73 20 6f 77 6e 20 70 |ns for i|ts own p|
|00002c20| 75 72 70 6f 73 65 73 2e | 20 42 79 20 6e 6f 20 6d |urposes.| By no m|
|00002c30| 65 61 6e 73 20 61 72 65 | 20 79 6f 75 20 72 65 73 |eans are| you res|
|00002c40| 74 72 69 63 74 65 64 20 | 74 6f 20 75 73 69 6e 67 |tricted |to using|
|00002c50| 20 63 6f 6c 6c 65 63 74 | 69 6f 6e 73 20 6f 6e 6c | collect|ions onl|
|00002c60| 79 20 77 69 74 68 69 6e | 20 74 68 65 20 51 75 69 |y within| the Qui|
|00002c70| 63 6b 44 72 61 77 20 47 | 58 20 70 72 69 6e 74 69 |ckDraw G|X printi|
|00002c80| 6e 67 20 61 72 63 68 69 | 74 65 63 74 75 72 65 2c |ng archi|tecture,|
|00002c90| 20 61 6c 74 68 6f 75 67 | 68 20 74 68 61 74 d5 73 | althoug|h that.s|
|00002ca0| 20 70 72 6f 62 61 62 6c | 79 20 77 68 65 72 65 20 | probabl|y where |
|00002cb0| 79 6f 75 d5 6c 6c 20 75 | 73 65 20 74 68 65 6d 20 |you.ll u|se them |
|00002cc0| 74 68 65 20 6d 6f 73 74 | 2e 20 0d 4f 56 45 52 52 |the most|. .OVERR|
|00002cd0| 49 44 49 4e 47 20 4d 45 | 53 53 41 47 45 53 20 46 |IDING ME|SSAGES F|
|00002ce0| 52 4f 4d 20 41 4e 20 41 | 50 50 4c 49 43 41 54 49 |ROM AN A|PPLICATI|
|00002cf0| 4f 4e 3a 20 54 48 45 20 | 4d 45 53 53 41 47 45 20 |ON: THE |MESSAGE |
|00002d00| 4d 41 4e 41 47 45 52 0d | 53 61 6d 20 57 65 69 73 |MANAGER.|Sam Weis|
|00002d10| 73 d5 73 20 61 72 74 69 | 63 6c 65 20 69 6e 20 64 |s.s arti|cle in d|
|00002d20| 65 76 65 6c 6f 70 20 49 | 73 73 75 65 20 31 35 2c |evelop I|ssue 15,|
|00002d30| 20 d2 44 65 76 65 6c 6f | 70 69 6e 67 20 51 75 69 | .Develo|ping Qui|
|00002d40| 63 6b 44 72 61 77 20 47 | 58 20 50 72 69 6e 74 69 |ckDraw G|X Printi|
|00002d50| 6e 67 20 45 78 74 65 6e | 73 69 6f 6e 73 2c d3 20 |ng Exten|sions,. |
|00002d60| 69 6e 74 72 6f 64 75 63 | 65 64 20 74 68 65 20 4d |introduc|ed the M|
|00002d70| 65 73 73 61 67 65 20 4d | 61 6e 61 67 65 72 2e 20 |essage M|anager. |
|00002d80| 54 68 65 20 51 75 69 63 | 6b 44 72 61 77 20 47 58 |The Quic|kDraw GX|
|00002d90| 20 70 72 69 6e 74 69 6e | 67 20 61 72 63 68 69 74 | printin|g archit|
|00002da0| 65 63 74 75 72 65 20 75 | 73 65 73 20 74 68 65 20 |ecture u|ses the |
|00002db0| 4d 65 73 73 61 67 65 20 | 4d 61 6e 61 67 65 72 20 |Message |Manager |
|00002dc0| 74 6f 20 69 6e 76 6f 6b | 65 20 70 72 69 6e 74 69 |to invok|e printi|
|00002dd0| 6e 67 20 6f 70 65 72 61 | 74 69 6f 6e 73 2c 20 61 |ng opera|tions, a|
|00002de0| 6e 64 20 79 6f 75 72 20 | 61 70 70 6c 69 63 61 74 |nd your |applicat|
|00002df0| 69 6f 6e 2c 20 70 72 69 | 6e 74 69 6e 67 20 65 78 |ion, pri|nting ex|
|00002e00| 74 65 6e 73 69 6f 6e 2c | 20 6f 72 20 70 72 69 6e |tension,| or prin|
|00002e10| 74 65 72 20 64 72 69 76 | 65 72 20 63 61 6e 20 6f |ter driv|er can o|
|00002e20| 76 65 72 72 69 64 65 20 | 6d 65 73 73 61 67 65 73 |verride |messages|
|00002e30| 20 74 6f 20 63 68 61 6e | 67 65 20 70 72 69 6e 74 | to chan|ge print|
|00002e40| 69 6e 67 20 62 65 68 61 | 76 69 6f 72 2e 20 54 68 |ing beha|vior. Th|
|00002e50| 69 73 20 70 72 6f 63 65 | 73 73 20 69 73 20 65 78 |is proce|ss is ex|
|00002e60| 70 6c 61 69 6e 65 64 20 | 69 6e 20 53 61 6d d5 73 |plained |in Sam.s|
|00002e70| 20 61 72 74 69 63 6c 65 | 2c 20 77 68 69 63 68 20 | article|, which |
|00002e80| 69 73 20 61 20 67 6f 6f | 64 20 72 65 66 65 72 65 |is a goo|d refere|
|00002e90| 6e 63 65 20 66 6f 72 20 | 61 6e 79 6f 6e 65 20 75 |nce for |anyone u|
|00002ea0| 6e 66 61 6d 69 6c 69 61 | 72 20 77 69 74 68 20 74 |nfamilia|r with t|
|00002eb0| 68 65 20 4d 65 73 73 61 | 67 65 20 4d 61 6e 61 67 |he Messa|ge Manag|
|00002ec0| 65 72 20 61 6e 64 20 68 | 6f 77 20 51 75 69 63 6b |er and h|ow Quick|
|00002ed0| 44 72 61 77 20 47 58 20 | 75 73 65 73 20 69 74 2e |Draw GX |uses it.|
|00002ee0| 20 54 68 69 73 20 61 72 | 74 69 63 6c 65 20 61 73 | This ar|ticle as|
|00002ef0| 73 75 6d 65 73 20 74 68 | 61 74 20 79 6f 75 20 61 |sumes th|at you a|
|00002f00| 6c 72 65 61 64 79 20 68 | 61 76 65 20 61 74 20 6c |lready h|ave at l|
|00002f10| 65 61 73 74 20 61 20 70 | 61 73 73 69 6e 67 20 66 |east a p|assing f|
|00002f20| 61 6d 69 6c 69 61 72 69 | 74 79 20 77 69 74 68 20 |amiliari|ty with |
|00002f30| 74 68 65 20 62 61 73 69 | 63 20 63 6f 6e 63 65 70 |the basi|c concep|
|00002f40| 74 73 2e 20 0d 57 68 65 | 6e 20 79 6f 75 20 6f 76 |ts. .Whe|n you ov|
|00002f50| 65 72 72 69 64 65 20 61 | 20 6d 65 73 73 61 67 65 |erride a| message|
|00002f60| 20 66 72 6f 6d 20 61 6e | 20 61 70 70 6c 69 63 61 | from an| applica|
|00002f70| 74 69 6f 6e 2c 20 79 6f | 75 d5 72 65 20 6d 6f 72 |tion, yo|u.re mor|
|00002f80| 65 20 72 65 73 74 72 69 | 63 74 65 64 20 69 6e 20 |e restri|cted in |
|00002f90| 77 68 61 74 20 79 6f 75 | 20 63 61 6e 20 64 6f 20 |what you| can do |
|00002fa0| 74 68 61 6e 20 69 66 20 | 79 6f 75 20 6f 76 65 72 |than if |you over|
|00002fb0| 72 69 64 65 20 61 20 6d | 65 73 73 61 67 65 20 66 |ride a m|essage f|
|00002fc0| 72 6f 6d 20 61 20 70 72 | 69 6e 74 69 6e 67 20 65 |rom a pr|inting e|
|00002fd0| 78 74 65 6e 73 69 6f 6e | 20 6f 72 20 70 72 69 6e |xtension| or prin|
|00002fe0| 74 65 72 20 64 72 69 76 | 65 72 2e 20 54 6f 20 75 |ter driv|er. To u|
|00002ff0| 6e 64 65 72 73 74 61 6e | 64 20 77 68 79 2c 20 63 |nderstan|d why, c|
|00003000| 6f 6e 73 69 64 65 72 20 | 61 20 63 61 73 65 20 77 |onsider |a case w|
|00003010| 68 65 72 65 20 79 6f 75 | 20 77 61 6e 74 20 74 6f |here you| want to|
|00003020| 20 6f 76 65 72 72 69 64 | 65 20 74 68 65 20 51 75 | overrid|e the Qu|
|00003030| 69 63 6b 44 72 61 77 20 | 47 58 20 70 72 69 6e 74 |ickDraw |GX print|
|00003040| 69 6e 67 20 6d 65 73 73 | 61 67 65 20 47 58 44 65 |ing mess|age GXDe|
|00003050| 73 70 6f 6f 6c 50 61 67 | 65 20 74 6f 20 61 64 64 |spoolPag|e to add|
|00003060| 20 61 20 73 65 72 69 61 | 6c 20 6e 75 6d 62 65 72 | a seria|l number|
|00003070| 20 74 6f 20 74 68 65 20 | 70 61 67 65 20 62 65 66 | to the |page bef|
|00003080| 6f 72 65 20 69 74 d5 73 | 20 70 72 69 6e 74 65 64 |ore it.s| printed|
|00003090| 2e 20 59 6f 75 20 63 61 | 6e 20 61 64 64 20 74 68 |. You ca|n add th|
|000030a0| 69 73 20 6f 76 65 72 72 | 69 64 65 20 74 6f 20 61 |is overr|ide to a|
|000030b0| 20 70 72 69 6e 74 69 6e | 67 20 65 78 74 65 6e 73 | printin|g extens|
|000030c0| 69 6f 6e 20 69 6e 20 61 | 20 73 74 72 61 69 67 68 |ion in a| straigh|
|000030d0| 74 66 6f 72 77 61 72 64 | 20 77 61 79 20 74 68 61 |tforward| way tha|
|000030e0| 74 20 77 6f 72 6b 73 20 | 72 65 67 61 72 64 6c 65 |t works |regardle|
|000030f0| 73 73 20 6f 66 20 77 68 | 69 63 68 20 61 70 70 6c |ss of wh|ich appl|
|00003100| 69 63 61 74 69 6f 6e 20 | 70 72 69 6e 74 73 20 74 |ication |prints t|
|00003110| 68 65 20 64 6f 63 75 6d | 65 6e 74 2e 20 49 66 2c |he docum|ent. If,|
|00003120| 20 6f 6e 20 74 68 65 20 | 6f 74 68 65 72 20 68 61 | on the |other ha|
|00003130| 6e 64 2c 20 74 68 65 20 | 6f 76 65 72 72 69 64 65 |nd, the |override|
|00003140| 20 69 73 20 61 74 74 65 | 6d 70 74 65 64 20 62 79 | is atte|mpted by|
|00003150| 20 61 6e 20 61 70 70 6c | 69 63 61 74 69 6f 6e 2c | an appl|ication,|
|00003160| 20 74 68 65 20 73 69 74 | 75 61 74 69 6f 6e 20 62 | the sit|uation b|
|00003170| 65 63 6f 6d 65 73 20 6d | 6f 72 65 20 70 72 6f 62 |ecomes m|ore prob|
|00003180| 6c 65 6d 61 74 69 63 2e | 20 54 68 65 20 6f 76 65 |lematic.| The ove|
|00003190| 72 72 69 64 65 20 77 6f | 6e d5 74 20 62 65 20 69 |rride wo|n.t be i|
|000031a0| 6e 76 6f 6b 65 64 20 62 | 65 63 61 75 73 65 20 69 |nvoked b|ecause i|
|000031b0| 74 d5 73 20 61 20 64 65 | 73 70 6f 6f 6c 69 6e 67 |t.s a de|spooling|
|000031c0| 2d 70 68 61 73 65 20 6d | 65 73 73 61 67 65 3b 20 |-phase m|essage; |
|000031d0| 6f 6e 6c 79 20 61 70 70 | 6c 69 63 61 74 69 6f 6e |only app|lication|
|000031e0| 2d 70 68 61 73 65 20 61 | 6e 64 20 73 70 6f 6f 6c |-phase a|nd spool|
|000031f0| 69 6e 67 2d 70 68 61 73 | 65 20 6d 65 73 73 61 67 |ing-phas|e messag|
|00003200| 65 73 20 63 61 6e 20 62 | 65 20 6f 76 65 72 72 69 |es can b|e overri|
|00003210| 64 64 65 6e 20 62 79 20 | 61 70 70 6c 69 63 61 74 |dden by |applicat|
|00003220| 69 6f 6e 73 2e 0d 54 6f | 20 75 6e 64 65 72 73 74 |ions..To| underst|
|00003230| 61 6e 64 20 61 20 73 65 | 63 6f 6e 64 20 6c 69 6d |and a se|cond lim|
|00003240| 69 74 61 74 69 6f 6e 20 | 6f 66 20 61 70 70 6c 69 |itation |of appli|
|00003250| 63 61 74 69 6f 6e 20 6f | 76 65 72 72 69 64 65 73 |cation o|verrides|
|00003260| 2c 20 6c 65 74 d5 73 20 | 6c 6f 6f 6b 20 61 74 20 |, let.s |look at |
|00003270| 68 6f 77 20 74 68 65 79 | d5 72 65 20 69 6e 73 74 |how they|.re inst|
|00003280| 61 6c 6c 65 64 20 69 6e | 20 74 68 65 20 6d 65 73 |alled in| the mes|
|00003290| 73 61 67 65 20 68 61 6e | 64 6c 65 72 20 63 68 61 |sage han|dler cha|
|000032a0| 69 6e 2e 20 54 68 69 73 | 20 69 73 20 64 6f 6e 65 |in. This| is done|
|000032b0| 20 62 79 20 70 61 73 73 | 69 6e 67 20 74 68 65 20 | by pass|ing the |
|000032c0| 72 6f 75 74 69 6e 65 20 | 47 58 49 6e 73 74 61 6c |routine |GXInstal|
|000032d0| 6c 41 70 70 6c 69 63 61 | 74 69 6f 6e 4f 76 65 72 |lApplica|tionOver|
|000032e0| 72 69 64 65 20 61 20 70 | 6f 69 6e 74 65 72 20 74 |ride a p|ointer t|
|000032f0| 6f 20 74 68 65 20 6f 76 | 65 72 72 69 64 65 20 70 |o the ov|erride p|
|00003300| 72 6f 63 65 64 75 72 65 | 20 61 6e 64 20 61 20 72 |rocedure| and a r|
|00003310| 65 66 65 72 65 6e 63 65 | 20 0d 74 6f 20 74 68 65 |eference| .to the|
|00003320| 20 64 6f 63 75 6d 65 6e | 74 d5 73 20 6a 6f 62 2c | documen|t.s job,|
|00003330| 20 6c 69 6b 65 20 73 6f | 3a 20 0d 47 58 49 6e 73 | like so|: .GXIns|
|00003340| 74 61 6c 6c 41 70 70 6c | 69 63 61 74 69 6f 6e 4f |tallAppl|icationO|
|00003350| 76 65 72 72 69 64 65 28 | 64 6f 63 4a 6f 62 2c 20 |verride(|docJob, |
|00003360| 67 78 4a 6f 62 50 72 69 | 6e 74 44 69 61 6c 6f 67 |gxJobPri|ntDialog|
|00003370| 2c 20 0d 09 09 09 09 09 | 09 09 09 09 09 09 20 20 |, ......|...... |
|00003380| 4d 79 4a 6f 62 50 72 69 | 6e 74 44 69 61 6c 6f 67 |MyJobPri|ntDialog|
|00003390| 4f 76 65 72 72 69 64 65 | 29 3b 0d 49 6e 20 74 68 |Override|);.In th|
|000033a0| 69 73 20 65 78 61 6d 70 | 6c 65 2c 20 74 68 65 20 |is examp|le, the |
|000033b0| 61 70 70 6c 69 63 61 74 | 69 6f 6e 20 69 73 20 6f |applicat|ion is o|
|000033c0| 76 65 72 72 69 64 69 6e | 67 20 74 68 65 20 47 58 |verridin|g the GX|
|000033d0| 4a 6f 62 50 72 69 6e 74 | 44 69 61 6c 6f 67 20 6d |JobPrint|Dialog m|
|000033e0| 65 73 73 61 67 65 20 77 | 69 74 68 20 61 6e 20 6f |essage w|ith an o|
|000033f0| 76 65 72 72 69 64 65 20 | 66 75 6e 63 74 69 6f 6e |verride |function|
|00003400| 20 63 61 6c 6c 65 64 20 | 4d 79 4a 6f 62 50 72 69 | called |MyJobPri|
|00003410| 6e 74 44 69 61 6c 6f 67 | 4f 76 65 72 72 69 64 65 |ntDialog|Override|
|00003420| 2e 20 64 6f 63 4a 6f 62 | 20 69 73 20 74 68 65 20 |. docJob| is the |
|00003430| 67 78 4a 6f 62 20 6f 62 | 6a 65 63 74 20 66 6f 72 |gxJob ob|ject for|
|00003440| 20 61 20 0d 64 6f 63 75 | 6d 65 6e 74 2e 20 42 65 | a .docu|ment. Be|
|00003450| 63 61 75 73 65 20 79 6f | 75 72 20 61 70 70 6c 69 |cause yo|ur appli|
|00003460| 63 61 74 69 6f 6e 20 68 | 61 73 20 61 63 63 65 73 |cation h|as acces|
|00003470| 73 20 6f 6e 6c 79 20 74 | 6f 20 69 74 73 20 6f 77 |s only t|o its ow|
|00003480| 6e 20 67 78 4a 6f 62 20 | 6f 62 6a 65 63 74 73 2c |n gxJob |objects,|
|00003490| 20 61 6e 20 61 70 70 6c | 69 63 61 74 69 6f 6e 20 | an appl|ication |
|000034a0| 6f 76 65 72 72 69 64 65 | 20 63 61 6e 20 62 65 20 |override| can be |
|000034b0| 69 6e 76 6f 6b 65 64 20 | 6f 6e 6c 79 20 66 6f 72 |invoked |only for|
|000034c0| 20 74 68 65 20 61 70 70 | 6c 69 63 61 74 69 6f 6e | the app|lication|
|000034d0| 20 74 68 61 74 20 69 6e | 73 74 61 6c 6c 65 64 20 | that in|stalled |
|000034e0| 69 74 2e 20 4f 6e 20 74 | 68 65 20 6f 74 68 65 72 |it. On t|he other|
|000034f0| 20 68 61 6e 64 2c 20 61 | 20 6d 65 73 73 61 67 65 | hand, a| message|
|00003500| 20 6f 76 65 72 72 69 64 | 65 20 66 72 6f 6d 20 61 | overrid|e from a|
|00003510| 20 70 72 69 6e 74 69 6e | 67 20 65 78 74 65 6e 73 | printin|g extens|
|00003520| 69 6f 6e 20 63 61 6e 20 | 61 66 66 65 63 74 20 65 |ion can |affect e|
|00003530| 76 65 72 79 20 64 6f 63 | 75 6d 65 6e 74 20 74 68 |very doc|ument th|
|00003540| 61 74 d5 73 20 70 72 69 | 6e 74 65 64 2c 20 72 65 |at.s pri|nted, re|
|00003550| 67 61 72 64 6c 65 73 73 | 20 6f 66 20 77 68 69 63 |gardless| of whic|
|00003560| 68 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 20 70 72 |h applic|ation pr|
|00003570| 69 6e 74 65 64 20 69 74 | 2e 20 0d 49 6e 20 73 75 |inted it|. .In su|
|00003580| 6d 6d 61 72 79 3a 0d a5 | 09 41 70 70 6c 69 63 61 |mmary:..|.Applica|
|00003590| 74 69 6f 6e 20 6f 76 65 | 72 72 69 64 65 73 20 61 |tion ove|rrides a|
|000035a0| 72 65 20 72 65 6c 69 61 | 62 6c 65 20 6f 6e 6c 79 |re relia|ble only|
|000035b0| 20 64 75 72 69 6e 67 20 | 74 68 65 20 61 70 70 6c | during |the appl|
|000035c0| 69 63 61 74 69 6f 6e 20 | 61 6e 64 20 73 70 6f 6f |ication |and spoo|
|000035d0| 6c 69 6e 67 20 70 68 61 | 73 65 73 20 6f 66 20 70 |ling pha|ses of p|
|000035e0| 72 69 6e 74 69 6e 67 2c | 20 77 68 69 63 68 20 65 |rinting,| which e|
|000035f0| 6e 64 20 6f 6e 63 65 20 | 74 68 65 20 64 6f 63 75 |nd once |the docu|
|00003600| 6d 65 6e 74 20 68 61 73 | 20 62 65 65 6e 20 73 70 |ment has| been sp|
|00003610| 6f 6f 6c 65 64 20 74 6f | 20 61 20 70 72 69 6e 74 |ooled to| a print|
|00003620| 20 66 69 6c 65 2e 20 59 | 6f 75 20 73 68 6f 75 6c | file. Y|ou shoul|
|00003630| 64 20 61 74 74 65 6d 70 | 74 20 74 6f 20 6f 76 65 |d attemp|t to ove|
|00003640| 72 72 69 64 65 20 6f 6e | 6c 79 20 61 70 70 6c 69 |rride on|ly appli|
|00003650| 63 61 74 69 6f 6e 2d 70 | 68 61 73 65 20 61 6e 64 |cation-p|hase and|
|00003660| 20 73 70 6f 6f 6c 69 6e | 67 2d 70 68 61 73 65 20 | spoolin|g-phase |
|00003670| 6d 65 73 73 61 67 65 73 | 20 66 72 6f 6d 20 61 6e |messages| from an|
|00003680| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 2e 0d a5 09 | applica|tion....|
|00003690| 41 70 70 6c 69 63 61 74 | 69 6f 6e 20 6f 76 65 72 |Applicat|ion over|
|000036a0| 72 69 64 65 73 20 61 72 | 65 20 69 6e 76 6f 6b 65 |rides ar|e invoke|
|000036b0| 64 20 6f 6e 6c 79 20 66 | 6f 72 20 74 68 65 20 61 |d only f|or the a|
|000036c0| 70 70 6c 69 63 61 74 69 | 6f 6e 20 69 6e 73 74 61 |pplicati|on insta|
|000036d0| 6c 6c 69 6e 67 20 74 68 | 65 20 6f 76 65 72 72 69 |lling th|e overri|
|000036e0| 64 65 2c 20 61 6e 64 20 | 6f 6e 6c 79 20 66 6f 72 |de, and |only for|
|000036f0| 20 74 68 65 20 67 78 4a | 6f 62 20 6f 62 6a 65 63 | the gxJ|ob objec|
|00003700| 74 73 20 69 6e 20 77 68 | 69 63 68 20 74 68 65 20 |ts in wh|ich the |
|00003710| 6f 76 65 72 72 69 64 65 | 73 20 61 72 65 20 69 6e |override|s are in|
|00003720| 73 74 61 6c 6c 65 64 2e | 0d 41 70 70 6c 69 63 61 |stalled.|.Applica|
|00003730| 74 69 6f 6e 20 6f 76 65 | 72 72 69 64 65 73 20 61 |tion ove|rrides a|
|00003740| 72 65 20 62 65 73 74 20 | 73 75 69 74 65 64 20 66 |re best |suited f|
|00003750| 6f 72 20 61 64 64 69 6e | 67 20 66 65 61 74 75 72 |or addin|g featur|
|00003760| 65 73 20 74 6f 20 74 68 | 65 20 70 72 69 6e 74 69 |es to th|e printi|
|00003770| 6e 67 20 64 69 61 6c 6f | 67 73 20 61 6e 64 20 6d |ng dialo|gs and m|
|00003780| 6f 64 69 66 79 69 6e 67 | 20 74 68 65 20 70 72 69 |odifying| the pri|
|00003790| 6e 74 20 66 69 6c 65 20 | 61 73 20 61 20 64 6f 63 |nt file |as a doc|
|000037a0| 75 6d 65 6e 74 20 69 73 | 20 62 65 69 6e 67 20 73 |ument is| being s|
|000037b0| 70 6f 6f 6c 65 64 2e 20 | 49 66 20 79 6f 75 20 66 |pooled. |If you f|
|000037c0| 65 65 6c 20 6c 69 6d 69 | 74 65 64 20 62 79 20 65 |eel limi|ted by e|
|000037d0| 69 74 68 65 72 20 6f 66 | 20 74 68 65 20 63 6f 6e |ither of| the con|
|000037e0| 64 69 74 69 6f 6e 73 20 | 6d 65 6e 74 69 6f 6e 65 |ditions |mentione|
|000037f0| 64 20 61 62 6f 76 65 2c | 20 79 6f 75 20 73 68 6f |d above,| you sho|
|00003800| 75 6c 64 20 6d 6f 76 65 | 20 79 6f 75 72 20 6f 76 |uld move| your ov|
|00003810| 65 72 72 69 64 65 20 6f | 75 74 20 6f 66 20 79 6f |erride o|ut of yo|
|00003820| 75 72 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 20 61 |ur appli|cation a|
|00003830| 6e 64 20 69 6e 74 6f 20 | 61 20 70 72 69 6e 74 69 |nd into |a printi|
|00003840| 6e 67 20 65 78 74 65 6e | 73 69 6f 6e 2e 20 0d 42 |ng exten|sion. .B|
|00003850| 45 43 4f 4d 49 4e 47 20 | 41 57 41 52 45 0d 4e 6f |ECOMING |AWARE.No|
|00003860| 77 20 6c 65 74 d5 73 20 | 6c 6f 6f 6b 20 61 74 20 |w let.s |look at |
|00003870| 77 68 61 74 20 61 6e 20 | 61 70 70 6c 69 63 61 74 |what an |applicat|
|00003880| 69 6f 6e 20 64 65 76 65 | 6c 6f 70 65 72 20 6e 65 |ion deve|loper ne|
|00003890| 65 64 73 20 74 6f 20 64 | 6f 20 74 6f 20 73 75 70 |eds to d|o to sup|
|000038a0| 70 6f 72 74 20 51 75 69 | 63 6b 44 72 61 77 20 47 |port Qui|ckDraw G|
|000038b0| 58 20 70 72 69 6e 74 69 | 6e 67 2e 20 57 65 d5 6c |X printi|ng. We.l|
|000038c0| 6c 20 74 61 6b 65 20 61 | 20 51 75 69 63 6b 44 72 |l take a| QuickDr|
|000038d0| 61 77 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 20 63 |aw appli|cation c|
|000038e0| 61 6c 6c 65 64 20 53 69 | 6d 70 6c 65 20 53 61 6d |alled Si|mple Sam|
|000038f0| 70 6c 65 20 61 6e 64 20 | 63 6f 6e 76 65 72 74 20 |ple and |convert |
|00003900| 69 74 20 69 6e 74 6f 20 | 69 74 73 20 51 75 69 63 |it into |its Quic|
|00003910| 6b 44 72 61 77 20 47 58 | d0 61 77 61 72 65 20 63 |kDraw GX|.aware c|
|00003920| 6f 75 6e 74 65 72 70 61 | 72 74 2c 20 53 69 6d 70 |ounterpa|rt, Simp|
|00003930| 6c 65 20 53 61 6d 70 6c | 65 20 47 58 2e 20 54 68 |le Sampl|e GX. Th|
|00003940| 65 20 63 6f 64 65 20 66 | 6f 72 20 62 6f 74 68 20 |e code f|or both |
|00003950| 73 61 6d 70 6c 65 73 20 | 69 73 20 6f 6e 20 74 68 |samples |is on th|
|00003960| 69 73 20 69 73 73 75 65 | d5 73 20 43 44 2e 20 0d |is issue|.s CD. .|
|00003970| 54 68 65 20 53 69 6d 70 | 6c 65 20 53 61 6d 70 6c |The Simp|le Sampl|
|00003980| 65 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 20 64 72 |e applic|ation dr|
|00003990| 61 77 73 20 75 73 69 6e | 67 20 76 61 72 69 6f 75 |aws usin|g variou|
|000039a0| 73 20 51 75 69 63 6b 44 | 72 61 77 20 63 6f 6d 6d |s QuickD|raw comm|
|000039b0| 61 6e 64 73 2c 20 69 6e | 63 6c 75 64 69 6e 67 20 |ands, in|cluding |
|000039c0| 74 68 6f 73 65 20 66 6f | 72 20 73 69 6d 70 6c 65 |those fo|r simple|
|000039d0| 20 6f 62 6a 65 63 74 73 | 2c 20 62 69 74 6d 61 70 | objects|, bitmap|
|000039e0| 73 2c 20 61 6e 64 20 50 | 69 63 43 6f 6d 6d 65 6e |s, and P|icCommen|
|000039f0| 74 73 2e 20 49 74 20 63 | 61 6e 20 68 61 6e 64 6c |ts. It c|an handl|
|00003a00| 65 20 6d 75 6c 74 69 70 | 6c 65 20 64 6f 63 75 6d |e multip|le docum|
|00003a10| 65 6e 74 73 20 77 69 74 | 68 20 6d 75 6c 74 69 70 |ents wit|h multip|
|00003a20| 6c 65 20 70 61 67 65 73 | 2c 20 61 6e 64 20 61 6c |le pages|, and al|
|00003a30| 74 68 6f 75 67 68 20 69 | 74 20 6b 6e 6f 77 73 20 |though i|t knows |
|00003a40| 6e 6f 74 68 69 6e 67 20 | 61 62 6f 75 74 20 51 75 |nothing |about Qu|
|00003a50| 69 63 6b 44 72 61 77 20 | 47 58 2c 20 69 74 20 69 |ickDraw |GX, it i|
|00003a60| 73 20 53 79 73 74 65 6d | 20 37 20 64 65 70 65 6e |s System| 7 depen|
|00003a70| 64 65 6e 74 20 28 49 20 | 6d 61 64 65 20 69 74 20 |dent (I |made it |
|00003a80| 74 68 61 74 20 77 61 79 | 20 74 6f 20 73 61 76 65 |that way| to save|
|00003a90| 20 6f 6e 20 63 6f 64 65 | 20 61 6e 64 20 63 6f 6e | on code| and con|
|00003aa0| 66 75 73 69 6f 6e 29 2e | 0d 48 65 72 65 d5 73 20 |fusion).|.Here.s |
|00003ab0| 61 20 73 75 6d 6d 61 72 | 79 20 6f 66 20 77 68 61 |a summar|y of wha|
|00003ac0| 74 20 6d 6f 73 74 20 51 | 75 69 63 6b 44 72 61 77 |t most Q|uickDraw|
|00003ad0| 20 47 58 d0 61 77 61 72 | 65 20 61 70 70 6c 69 63 | GX.awar|e applic|
|00003ae0| 61 74 69 6f 6e 73 20 6e | 65 65 64 20 74 6f 20 64 |ations n|eed to d|
|00003af0| 6f 3a 0d a5 09 44 65 74 | 65 72 6d 69 6e 65 20 77 |o:...Det|ermine w|
|00003b00| 68 65 74 68 65 72 20 51 | 75 69 63 6b 44 72 61 77 |hether Q|uickDraw|
|00003b10| 20 47 58 20 69 73 20 70 | 72 65 73 65 6e 74 2c 20 | GX is p|resent, |
|00003b20| 61 6e 64 20 69 66 20 73 | 6f 2c 20 69 6e 69 74 69 |and if s|o, initi|
|00003b30| 61 6c 69 7a 65 20 74 68 | 65 20 51 75 69 63 6b 44 |alize th|e QuickD|
|00003b40| 72 61 77 20 47 58 20 6d | 61 6e 61 67 65 72 73 20 |raw GX m|anagers |
|00003b50| 28 61 6e 64 20 63 6c 6f | 73 65 20 74 68 65 6d 20 |(and clo|se them |
|00003b60| 64 6f 77 6e 20 77 68 65 | 6e 20 74 68 65 20 61 70 |down whe|n the ap|
|00003b70| 70 6c 69 63 61 74 69 6f | 6e 20 71 75 69 74 73 29 |plicatio|n quits)|
|00003b80| 2e 0d a5 09 43 72 65 61 | 74 65 20 61 20 67 78 4a |....Crea|te a gxJ|
|00003b90| 6f 62 20 6f 62 6a 65 63 | 74 20 66 6f 72 20 65 61 |ob objec|t for ea|
|00003ba0| 63 68 20 64 6f 63 75 6d | 65 6e 74 20 63 72 65 61 |ch docum|ent crea|
|00003bb0| 74 65 64 20 61 6e 64 20 | 64 69 73 70 6f 73 65 20 |ted and |dispose |
|00003bc0| 6f 66 20 74 68 65 20 67 | 78 4a 6f 62 20 77 68 65 |of the g|xJob whe|
|00003bd0| 6e 20 74 68 65 20 64 6f | 63 75 6d 65 6e 74 20 69 |n the do|cument i|
|00003be0| 73 20 63 6c 6f 73 65 64 | 2e 20 0d a5 09 4f 76 65 |s closed|. ...Ove|
|00003bf0| 72 72 69 64 65 20 74 68 | 65 20 47 58 50 72 69 6e |rride th|e GXPrin|
|00003c00| 74 69 6e 67 45 76 65 6e | 74 20 6d 65 73 73 61 67 |tingEven|t messag|
|00003c10| 65 20 28 69 6e 20 6f 72 | 64 65 72 20 74 6f 20 73 |e (in or|der to s|
|00003c20| 75 70 70 6f 72 74 20 74 | 68 65 20 51 75 69 63 6b |upport t|he Quick|
|00003c30| 44 72 61 77 20 47 58 20 | 6d 6f 76 61 62 6c 65 20 |Draw GX |movable |
|00003c40| 6d 6f 64 61 6c 20 70 72 | 69 6e 74 69 6e 67 20 64 |modal pr|inting d|
|00003c50| 69 61 6c 6f 67 73 29 20 | 77 68 69 6c 65 20 70 72 |ialogs) |while pr|
|00003c60| 69 6e 74 69 6e 67 20 64 | 69 61 6c 6f 67 73 20 61 |inting d|ialogs a|
|00003c70| 72 65 20 64 69 73 70 6c | 61 79 65 64 2e 0d a5 09 |re displ|ayed....|
|00003c80| 55 70 64 61 74 65 20 67 | 78 4a 6f 62 20 6f 62 6a |Update g|xJob obj|
|00003c90| 65 63 74 73 20 6f 6e 20 | 72 65 73 75 6d 65 20 65 |ects on |resume e|
|00003ca0| 76 65 6e 74 73 20 28 69 | 6e 20 63 61 73 65 20 74 |vents (i|n case t|
|00003cb0| 68 65 20 63 68 61 72 61 | 63 74 65 72 69 73 74 69 |he chara|cteristi|
|00003cc0| 63 73 20 6f 66 20 74 68 | 65 20 64 65 73 6b 74 6f |cs of th|e deskto|
|00003cd0| 70 20 70 72 69 6e 74 65 | 72 20 79 6f 75 d5 72 65 |p printe|r you.re|
|00003ce0| 20 70 72 69 6e 74 69 6e | 67 20 74 6f 20 68 61 76 | printin|g to hav|
|00003cf0| 65 20 63 68 61 6e 67 65 | 64 29 2e 0d a5 09 53 61 |e change|d)....Sa|
|00003d00| 76 65 20 61 6e 64 20 6c | 6f 61 64 20 61 20 64 6f |ve and l|oad a do|
|00003d10| 63 75 6d 65 6e 74 d5 73 | 20 67 78 4a 6f 62 20 6f |cument.s| gxJob o|
|00003d20| 62 6a 65 63 74 20 74 6f | 20 61 6e 64 20 66 72 6f |bject to| and fro|
|00003d30| 6d 20 64 69 73 6b 20 61 | 6e 64 20 63 6f 6e 76 65 |m disk a|nd conve|
|00003d40| 72 74 20 70 72 69 6e 74 | 20 72 65 63 6f 72 64 73 |rt print| records|
|00003d50| 20 74 6f 20 67 78 4a 6f | 62 20 6f 62 6a 65 63 74 | to gxJo|b object|
|00003d60| 73 20 77 68 65 6e 20 6c | 6f 61 64 69 6e 67 20 64 |s when l|oading d|
|00003d70| 6f 63 75 6d 65 6e 74 73 | 20 63 72 65 61 74 65 64 |ocuments| created|
|00003d80| 20 66 72 6f 6d 20 70 72 | 65 d0 51 75 69 63 6b 44 | from pr|e.QuickD|
|00003d90| 72 61 77 20 47 58 20 76 | 65 72 73 69 6f 6e 73 20 |raw GX v|ersions |
|00003da0| 6f 66 20 79 6f 75 72 20 | 61 70 70 6c 69 63 61 74 |of your |applicat|
|00003db0| 69 6f 6e 2e 0d a5 09 4d | 61 6b 65 20 74 68 65 20 |ion....M|ake the |
|00003dc0| 43 75 73 74 6f 6d 20 50 | 61 67 65 20 53 65 74 75 |Custom P|age Setu|
|00003dd0| 70 20 61 6e 64 20 50 72 | 69 6e 74 20 4f 6e 65 20 |p and Pr|int One |
|00003de0| 43 6f 70 79 20 6d 65 6e | 75 20 69 74 65 6d 73 20 |Copy men|u items |
|00003df0| 61 76 61 69 6c 61 62 6c | 65 20 69 6e 20 74 68 65 |availabl|e in the|
|00003e00| 20 46 69 6c 65 20 6d 65 | 6e 75 2e 20 0d a5 09 49 | File me|nu. ...I|
|00003e10| 6e 76 6f 6b 65 20 74 68 | 65 20 51 75 69 63 6b 44 |nvoke th|e QuickD|
|00003e20| 72 61 77 20 47 58 20 70 | 72 69 6e 74 69 6e 67 20 |raw GX p|rinting |
|00003e30| 64 69 61 6c 6f 67 73 20 | 61 6e 64 20 73 75 70 70 |dialogs |and supp|
|00003e40| 6f 72 74 20 63 75 73 74 | 6f 6d 20 66 6f 72 6d 61 |ort cust|om forma|
|00003e50| 74 74 69 6e 67 20 62 79 | 20 70 61 67 65 20 28 65 |tting by| page (e|
|00003e60| 61 63 68 20 70 61 67 65 | 20 63 61 6e 20 68 61 76 |ach page| can hav|
|00003e70| 65 20 61 20 75 6e 69 71 | 75 65 20 70 61 67 65 20 |e a uniq|ue page |
|00003e80| 66 6f 72 6d 61 74 2c 20 | 6f 72 20 63 61 6e 20 73 |format, |or can s|
|00003e90| 68 61 72 65 20 61 6e 6f | 74 68 65 72 20 70 61 67 |hare ano|ther pag|
|00003ea0| 65 d5 73 20 66 6f 72 6d | 61 74 29 2e 0d a5 09 53 |e.s form|at)....S|
|00003eb0| 74 6f 72 65 20 70 61 67 | 65 2d 74 6f 2d 66 6f 72 |tore pag|e-to-for|
|00003ec0| 6d 61 74 20 63 6f 72 72 | 65 73 70 6f 6e 64 65 6e |mat corr|esponden|
|00003ed0| 63 65 73 20 74 6f 20 64 | 69 73 6b 20 77 69 74 68 |ces to d|isk with|
|00003ee0| 20 61 20 64 6f 63 75 6d | 65 6e 74 20 28 61 6e 64 | a docum|ent (and|
|00003ef0| 20 6c 6f 61 64 20 74 68 | 65 6d 20 61 67 61 69 6e | load th|em again|
|00003f00| 20 77 68 65 6e 20 74 68 | 65 20 64 6f 63 75 6d 65 | when th|e docume|
|00003f10| 6e 74 20 69 73 20 6f 70 | 65 6e 65 64 29 2e 0d a5 |nt is op|ened)...|
|00003f20| 09 48 61 76 65 20 61 20 | 70 72 69 6e 74 20 6c 6f |.Have a |print lo|
|00003f30| 6f 70 20 74 68 61 74 20 | 75 73 65 73 20 51 75 69 |op that |uses Qui|
|00003f40| 63 6b 44 72 61 77 20 47 | 58 20 70 72 69 6e 74 69 |ckDraw G|X printi|
|00003f50| 6e 67 20 63 6f 6d 6d 61 | 6e 64 73 20 61 6e 64 20 |ng comma|nds and |
|00003f60| 74 72 61 6e 73 6c 61 74 | 65 73 20 51 75 69 63 6b |translat|es Quick|
|00003f70| 44 72 61 77 20 63 6f 6d | 6d 61 6e 64 73 20 74 6f |Draw com|mands to|
|00003f80| 20 51 75 69 63 6b 44 72 | 61 77 20 47 58 20 73 68 | QuickDr|aw GX sh|
|00003f90| 61 70 65 73 20 66 6f 72 | 20 70 72 69 6e 74 69 6e |apes for| printin|
|00003fa0| 67 2e 0d a5 09 49 6d 70 | 6c 65 6d 65 6e 74 20 74 |g....Imp|lement t|
|00003fb0| 68 65 20 50 72 69 6e 74 | 20 4f 6e 65 20 43 6f 70 |he Print| One Cop|
|00003fc0| 79 20 66 65 61 74 75 72 | 65 2e 0d a5 09 53 75 70 |y featur|e....Sup|
|00003fd0| 70 6f 72 74 20 74 68 65 | 20 6e 65 77 20 61 74 74 |port the| new att|
|00003fe0| 72 69 62 75 74 65 20 6f | 66 20 74 68 65 20 27 70 |ribute o|f the 'p|
|00003ff0| 64 6f 63 27 20 41 70 70 | 6c 65 20 65 76 65 6e 74 |doc' App|le event|
|00004000| 20 74 6f 20 70 72 6f 70 | 65 72 6c 79 20 73 75 70 | to prop|erly sup|
|00004010| 70 6f 72 74 20 64 72 61 | 67 2d 61 6e 64 2d 64 72 |port dra|g-and-dr|
|00004020| 6f 70 20 70 72 69 6e 74 | 69 6e 67 20 6f 66 20 64 |op print|ing of d|
|00004030| 6f 63 75 6d 65 6e 74 73 | 20 66 72 6f 6d 20 74 68 |ocuments| from th|
|00004040| 65 20 46 69 6e 64 65 72 | 2e 0d 45 61 63 68 20 6f |e Finder|..Each o|
|00004050| 66 20 74 68 65 73 65 20 | 69 73 20 64 69 73 63 75 |f these |is discu|
|00004060| 73 73 65 64 20 69 6e 20 | 6f 72 64 65 72 20 69 6e |ssed in |order in|
|00004070| 20 74 68 65 20 72 65 73 | 74 20 6f 66 20 74 68 69 | the res|t of thi|
|00004080| 73 20 61 72 74 69 63 6c | 65 2e 0d 50 52 45 50 41 |s articl|e..PREPA|
|00004090| 52 41 54 49 4f 4e 0d 42 | 65 66 6f 72 65 20 79 6f |RATION.B|efore yo|
|000040a0| 75 20 63 61 6e 20 64 6f | 20 61 6e 79 74 68 69 6e |u can do| anythin|
|000040b0| 67 20 77 69 74 68 20 51 | 75 69 63 6b 44 72 61 77 |g with Q|uickDraw|
|000040c0| 20 47 58 2c 20 79 6f 75 | 20 6e 65 65 64 20 74 6f | GX, you| need to|
|000040d0| 20 64 65 74 65 72 6d 69 | 6e 65 20 77 68 65 74 68 | determi|ne wheth|
|000040e0| 65 72 20 69 74 d5 73 20 | 61 76 61 69 6c 61 62 6c |er it.s |availabl|
|000040f0| 65 2e 20 59 6f 75 20 73 | 68 6f 75 6c 64 20 64 6f |e. You s|hould do|
|00004100| 20 74 68 69 73 20 69 6e | 20 79 6f 75 72 20 69 6e | this in| your in|
|00004110| 69 74 69 61 6c 69 7a 65 | 20 72 6f 75 74 69 6e 65 |itialize| routine|
|00004120| 2c 20 61 66 74 65 72 20 | 79 6f 75 d5 76 65 20 64 |, after |you.ve d|
|00004130| 65 74 65 72 6d 69 6e 65 | 64 20 74 68 61 74 20 74 |etermine|d that t|
|00004140| 68 65 20 6f 74 68 65 72 | 20 6d 61 6e 61 67 65 72 |he other| manager|
|00004150| 73 20 79 6f 75 72 20 61 | 70 70 6c 69 63 61 74 69 |s your a|pplicati|
|00004160| 6f 6e 20 72 65 71 75 69 | 72 65 73 20 61 72 65 20 |on requi|res are |
|00004170| 61 76 61 69 6c 61 62 6c | 65 2e 20 54 68 65 20 4d |availabl|e. The M|
|00004180| 79 49 6e 69 74 47 58 49 | 66 50 72 65 73 65 6e 74 |yInitGXI|fPresent|
|00004190| 20 72 6f 75 74 69 6e 65 | 20 69 6e 20 4c 69 73 74 | routine| in List|
|000041a0| 69 6e 67 20 31 20 73 68 | 6f 77 73 20 6f 6e 65 20 |ing 1 sh|ows one |
|000041b0| 77 61 79 20 6f 66 20 64 | 6f 69 6e 67 20 74 68 69 |way of d|oing thi|
|000041c0| 73 2e 20 0d 4c 69 73 74 | 69 6e 67 20 31 2e 20 51 |s. .List|ing 1. Q|
|000041d0| 75 69 63 6b 44 72 61 77 | 20 47 58 20 70 72 65 70 |uickDraw| GX prep|
|000041e0| 61 72 61 74 69 6f 6e 20 | 61 6e 64 20 63 6c 65 61 |aration |and clea|
|000041f0| 6e 75 70 20 0d 76 6f 69 | 64 20 4d 79 49 6e 69 74 |nup .voi|d MyInit|
|00004200| 47 58 49 66 50 72 65 73 | 65 6e 74 28 29 0d 7b 0d |GXIfPres|ent().{.|
|00004210| 09 6c 6f 6e 67 09 09 09 | 67 78 56 65 72 73 69 6f |.long...|gxVersio|
|00004220| 6e 2c 20 67 78 50 72 69 | 6e 74 56 65 72 73 69 6f |n, gxPri|ntVersio|
|00004230| 6e 3b 0d 09 67 47 58 49 | 73 50 72 65 73 65 6e 74 |n;..gGXI|sPresent|
|00004240| 20 3d 20 66 61 6c 73 65 | 3b 0d 09 2f 2a 20 43 68 | = false|;../* Ch|
|00004250| 65 63 6b 20 74 6f 20 73 | 65 65 20 77 68 65 74 68 |eck to s|ee wheth|
|00004260| 65 72 20 51 75 69 63 6b | 44 72 61 77 20 47 58 20 |er Quick|Draw GX |
|00004270| 69 73 20 61 76 61 69 6c | 61 62 6c 65 2e 20 2a 2f |is avail|able. */|
|00004280| 0d 09 69 66 20 28 47 65 | 73 74 61 6c 74 28 67 65 |..if (Ge|stalt(ge|
|00004290| 73 74 61 6c 74 47 58 56 | 65 72 73 69 6f 6e 2c 20 |staltGXV|ersion, |
|000042a0| 26 67 78 56 65 72 73 69 | 6f 6e 29 20 3d 3d 20 6e |&gxVersi|on) == n|
|000042b0| 6f 45 72 72 29 0d 09 09 | 20 69 66 20 28 47 65 73 |oErr)...| if (Ges|
|000042c0| 74 61 6c 74 28 67 65 73 | 74 61 6c 74 47 58 50 72 |talt(ges|taltGXPr|
|000042d0| 69 6e 74 69 6e 67 4d 67 | 72 56 65 72 73 69 6f 6e |intingMg|rVersion|
|000042e0| 2c 20 26 67 78 50 72 69 | 6e 74 56 65 72 73 69 6f |, &gxPri|ntVersio|
|000042f0| 6e 29 0d 09 09 09 09 09 | 09 3d 3d 20 6e 6f 45 72 |n)......|.== noEr|
|00004300| 72 29 0d 09 09 09 67 47 | 58 49 73 50 72 65 73 65 |r)....gG|XIsPrese|
|00004310| 6e 74 20 3d 20 74 72 75 | 65 3b 0d 09 2f 2a 20 49 |nt = tru|e;../* I|
|00004320| 66 20 73 6f 2c 20 69 6e | 69 74 69 61 6c 69 7a 65 |f so, in|itialize|
|00004330| 20 51 75 69 63 6b 44 72 | 61 77 20 47 58 2e 20 2a | QuickDr|aw GX. *|
|00004340| 2f 0d 09 69 66 20 28 67 | 47 58 49 73 50 72 65 73 |/..if (g|GXIsPres|
|00004350| 65 6e 74 29 20 7b 0d 09 | 09 20 67 43 6c 69 65 6e |ent) {..|. gClien|
|00004360| 74 20 3d 20 47 58 4e 65 | 77 47 72 61 70 68 69 63 |t = GXNe|wGraphic|
|00004370| 73 43 6c 69 65 6e 74 28 | 6e 69 6c 2c 20 6b 47 72 |sClient(|nil, kGr|
|00004380| 61 70 68 69 63 73 48 65 | 61 70 53 69 7a 65 2c 0d |aphicsHe|apSize,.|
|00004390| 09 09 09 09 09 09 20 20 | 28 67 78 43 6c 69 65 6e |...... |(gxClien|
|000043a0| 74 41 74 74 72 69 62 75 | 74 65 29 20 30 29 3b 0d |tAttribu|te) 0);.|
|000043b0| 09 09 20 47 58 45 6e 74 | 65 72 47 72 61 70 68 69 |.. GXEnt|erGraphi|
|000043c0| 63 73 28 29 3b 0d 09 09 | 20 47 58 49 6e 69 74 50 |cs();...| GXInitP|
|000043d0| 72 69 6e 74 69 6e 67 28 | 29 3b 0d 09 7d 0d 7d 0d |rinting(|);..}.}.|
|000043e0| 76 6f 69 64 20 4d 79 43 | 6c 65 61 6e 55 70 47 58 |void MyC|leanUpGX|
|000043f0| 49 66 50 72 65 73 65 6e | 74 28 29 0d 7b 0d 09 69 |IfPresen|t().{..i|
|00004400| 66 20 28 67 47 58 49 73 | 50 72 65 73 65 6e 74 29 |f (gGXIs|Present)|
|00004410| 20 7b 0d 09 09 20 47 58 | 45 78 69 74 50 72 69 6e | {... GX|ExitPrin|
|00004420| 74 69 6e 67 28 29 3b 0d | 09 09 20 47 58 44 69 73 |ting();.|.. GXDis|
|00004430| 70 6f 73 65 47 72 61 70 | 68 69 63 73 43 6c 69 65 |poseGrap|hicsClie|
|00004440| 6e 74 28 67 43 6c 69 65 | 6e 74 29 3b 0d 09 09 20 |nt(gClie|nt);... |
|00004450| 47 58 45 78 69 74 47 72 | 61 70 68 69 63 73 28 29 |GXExitGr|aphics()|
|00004460| 3b 0d 09 7d 0d 7d 0d 09 | 0d 49 6e 20 4d 79 49 6e |;..}.}..|.In MyIn|
|00004470| 69 74 47 58 49 66 50 72 | 65 73 65 6e 74 2c 20 77 |itGXIfPr|esent, w|
|00004480| 65 20 75 73 65 20 47 65 | 73 74 61 6c 74 20 74 6f |e use Ge|stalt to|
|00004490| 20 64 65 74 65 72 6d 69 | 6e 65 20 77 68 65 74 68 | determi|ne wheth|
|000044a0| 65 72 20 74 68 65 20 51 | 75 69 63 6b 44 72 61 77 |er the Q|uickDraw|
|000044b0| 20 47 58 20 67 72 61 70 | 68 69 63 73 20 61 6e 64 | GX grap|hics and|
|000044c0| 20 70 72 69 6e 74 69 6e | 67 20 72 6f 75 74 69 6e | printin|g routin|
|000044d0| 65 73 20 61 72 65 20 70 | 72 65 73 65 6e 74 2e 20 |es are p|resent. |
|000044e0| 49 66 20 73 6f 2c 20 77 | 65 20 63 61 6c 6c 20 47 |If so, w|e call G|
|000044f0| 58 4e 65 77 47 72 61 70 | 68 69 63 73 43 6c 69 65 |XNewGrap|hicsClie|
|00004500| 6e 74 20 0d 74 6f 20 73 | 65 74 20 61 73 69 64 65 |nt .to s|et aside|
|00004510| 20 6d 65 6d 6f 72 79 20 | 66 6f 72 20 51 75 69 63 | memory |for Quic|
|00004520| 6b 44 72 61 77 20 47 58 | 20 67 72 61 70 68 69 63 |kDraw GX| graphic|
|00004530| 73 20 6f 70 65 72 61 74 | 69 6f 6e 73 2c 20 61 6e |s operat|ions, an|
|00004540| 64 20 77 65 20 63 61 6c | 6c 20 47 58 45 6e 74 65 |d we cal|l GXEnte|
|00004550| 72 47 72 61 70 68 69 63 | 73 20 61 6e 64 20 47 58 |rGraphic|s and GX|
|00004560| 49 6e 69 74 50 72 69 6e | 74 69 6e 67 20 74 6f 20 |InitPrin|ting to |
|00004570| 65 6e 61 62 6c 65 20 74 | 68 65 20 51 75 69 63 6b |enable t|he Quick|
|00004580| 44 72 61 77 20 47 58 20 | 66 75 6e 63 74 69 6f 6e |Draw GX |function|
|00004590| 73 20 77 65 d5 6c 6c 20 | 20 0d 75 73 65 2e 20 4e |s we.ll | .use. N|
|000045a0| 6f 74 65 20 74 68 61 74 | 20 77 65 20 61 6c 73 6f |ote that| we also|
|000045b0| 20 73 65 74 20 61 20 67 | 6c 6f 62 61 6c 20 76 61 | set a g|lobal va|
|000045c0| 72 69 61 62 6c 65 2c 20 | 67 47 58 49 73 50 72 65 |riable, |gGXIsPre|
|000045d0| 73 65 6e 74 2c 20 77 68 | 69 63 68 20 69 6e 64 69 |sent, wh|ich indi|
|000045e0| 63 61 74 65 73 20 77 68 | 65 74 68 65 72 20 74 68 |cates wh|ether th|
|000045f0| 65 20 51 75 69 63 6b 44 | 72 61 77 20 47 58 20 6d |e QuickD|raw GX m|
|00004600| 61 6e 61 67 65 72 73 20 | 77 65 20 72 65 71 75 69 |anagers |we requi|
|00004610| 72 65 20 61 72 65 20 70 | 72 65 73 65 6e 74 2e 20 |re are p|resent. |
|00004620| 57 65 d5 6c 6c 20 63 68 | 65 63 6b 20 74 68 69 73 |We.ll ch|eck this|
|00004630| 20 76 61 6c 75 65 20 77 | 68 65 6e 65 76 65 72 20 | value w|henever |
|00004640| 77 65 20 6e 65 65 64 20 | 74 6f 20 6d 61 6b 65 20 |we need |to make |
|00004650| 61 20 64 65 63 69 73 69 | 6f 6e 20 61 62 6f 75 74 |a decisi|on about|
|00004660| 20 77 68 65 74 68 65 72 | 20 74 6f 20 75 73 65 20 | whether| to use |
|00004670| 51 75 69 63 6b 44 72 61 | 77 20 6f 72 20 51 75 69 |QuickDra|w or Qui|
|00004680| 63 6b 44 72 61 77 20 47 | 58 20 6d 65 74 68 6f 64 |ckDraw G|X method|
|00004690| 73 2e 0d 49 6d 70 6f 72 | 74 61 6e 74 3a 20 59 6f |s..Impor|tant: Yo|
|000046a0| 75 20 63 61 6e 6e 6f 74 | 20 69 6e 74 65 72 6d 69 |u cannot| intermi|
|000046b0| 78 20 50 72 69 6e 74 69 | 6e 67 20 4d 61 6e 61 67 |x Printi|ng Manag|
|000046c0| 65 72 20 61 6e 64 20 51 | 75 69 63 6b 44 72 61 77 |er and Q|uickDraw|
|000046d0| 20 47 58 20 70 72 69 6e | 74 69 6e 67 20 63 61 6c | GX prin|ting cal|
|000046e0| 6c 73 2e 20 44 6f 20 6e | 6f 74 20 63 61 6c 6c 20 |ls. Do n|ot call |
|000046f0| 5f 50 72 47 6c 75 65 5b | 41 38 46 44 5d 20 69 66 |_PrGlue[|A8FD] if|
|00004700| 20 79 6f 75 20 68 61 76 | 65 20 63 61 6c 6c 65 64 | you hav|e called|
|00004710| 20 5f 49 6e 69 74 50 72 | 69 6e 74 69 6e 67 2e 20 | _InitPr|inting. |
|00004720| 0d 57 68 65 6e 20 74 68 | 65 20 75 73 65 72 20 71 |.When th|e user q|
|00004730| 75 69 74 73 20 74 68 65 | 20 61 70 70 6c 69 63 61 |uits the| applica|
|00004740| 74 69 6f 6e 2c 20 77 65 | 20 6e 65 65 64 20 74 6f |tion, we| need to|
|00004750| 20 72 65 6c 65 61 73 65 | 20 61 6e 79 20 6d 65 6d | release| any mem|
|00004760| 6f 72 79 20 77 65 20 61 | 6c 6c 6f 63 61 74 65 64 |ory we a|llocated|
|00004770| 20 61 6e 64 20 63 6c 6f | 73 65 20 64 6f 77 6e 20 | and clo|se down |
|00004780| 51 75 69 63 6b 44 72 61 | 77 20 47 58 20 70 72 69 |QuickDra|w GX pri|
|00004790| 6e 74 69 6e 67 20 61 6e | 64 20 67 72 61 70 68 69 |nting an|d graphi|
|000047a0| 63 73 2e 20 57 65 20 64 | 6f 20 74 68 69 73 20 61 |cs. We d|o this a|
|000047b0| 73 20 73 68 6f 77 6e 20 | 69 6e 20 74 68 65 20 4d |s shown |in the M|
|000047c0| 79 43 6c 65 61 6e 55 70 | 47 58 49 66 50 72 65 73 |yCleanUp|GXIfPres|
|000047d0| 65 6e 74 20 72 6f 75 74 | 69 6e 65 20 69 6e 20 4c |ent rout|ine in L|
|000047e0| 69 73 74 69 6e 67 20 31 | 2e 20 0d 43 52 45 41 54 |isting 1|. .CREAT|
|000047f0| 49 4e 47 20 41 4e 44 20 | 44 49 53 50 4f 53 49 4e |ING AND |DISPOSIN|
|00004800| 47 20 4f 46 20 47 58 4a | 4f 42 20 4f 42 4a 45 43 |G OF GXJ|OB OBJEC|
|00004810| 54 53 20 0d 57 69 74 68 | 20 74 68 65 20 4d 79 49 |TS .With| the MyI|
|00004820| 6e 69 74 47 58 49 66 50 | 72 65 73 65 6e 74 20 61 |nitGXIfP|resent a|
|00004830| 6e 64 20 4d 79 43 6c 65 | 61 6e 55 70 47 58 49 66 |nd MyCle|anUpGXIf|
|00004840| 50 72 65 73 65 6e 74 20 | 72 6f 75 74 69 6e 65 73 |Present |routines|
|00004850| 20 61 64 64 65 64 20 74 | 6f 20 6f 75 72 20 63 6f | added t|o our co|
|00004860| 64 65 2c 20 77 65 d5 72 | 65 20 6e 6f 77 20 72 65 |de, we.r|e now re|
|00004870| 61 64 79 20 74 6f 20 6d | 61 6b 65 20 6f 75 72 20 |ady to m|ake our |
|00004880| 61 70 70 6c 69 63 61 74 | 69 6f 6e d5 73 20 64 6f |applicat|ion.s do|
|00004890| 63 75 6d 65 6e 74 73 20 | 66 69 74 20 69 6e 74 6f |cuments |fit into|
|000048a0| 20 74 68 65 20 51 75 69 | 63 6b 44 72 61 77 20 47 | the Qui|ckDraw G|
|000048b0| 58 20 70 72 69 6e 74 20 | 6d 6f 64 65 6c 2e 20 57 |X print |model. W|
|000048c0| 65 20 64 6f 20 74 68 69 | 73 20 62 79 20 63 72 65 |e do thi|s by cre|
|000048d0| 61 74 69 6e 67 20 61 20 | 67 78 4a 6f 62 20 6f 62 |ating a |gxJob ob|
|000048e0| 6a 65 63 74 20 77 68 65 | 6e 65 76 65 72 20 77 65 |ject whe|never we|
|000048f0| 20 63 72 65 61 74 65 20 | 61 20 64 6f 63 75 6d 65 | create |a docume|
|00004900| 6e 74 2e 20 4f 75 72 20 | 6e 6f 6e d0 51 75 69 63 |nt. Our |non.Quic|
|00004910| 6b 44 72 61 77 20 47 58 | 20 61 70 70 6c 69 63 61 |kDraw GX| applica|
|00004920| 74 69 6f 6e 2c 20 53 69 | 6d 70 6c 65 20 53 61 6d |tion, Si|mple Sam|
|00004930| 70 6c 65 2c 20 63 6f 6e | 74 61 69 6e 73 20 61 20 |ple, con|tains a |
|00004940| 72 6f 75 74 69 6e 65 20 | 6e 61 6d 65 64 20 4d 79 |routine |named My|
|00004950| 43 72 65 61 74 65 44 6f | 63 75 6d 65 6e 74 20 74 |CreateDo|cument t|
|00004960| 68 61 74 d5 73 20 63 61 | 6c 6c 65 64 20 77 68 65 |hat.s ca|lled whe|
|00004970| 6e 65 76 65 72 20 74 68 | 65 20 75 73 65 72 20 63 |never th|e user c|
|00004980| 72 65 61 74 65 73 20 61 | 20 64 6f 63 75 6d 65 6e |reates a| documen|
|00004990| 74 2e 20 41 73 20 73 68 | 6f 77 6e 20 69 6e 20 74 |t. As sh|own in t|
|000049a0| 68 65 20 53 69 6d 70 6c | 65 20 53 61 6d 70 6c 65 |he Simpl|e Sample|
|000049b0| 20 47 58 20 61 70 70 6c | 69 63 61 74 69 6f 6e 2c | GX appl|ication,|
|000049c0| 20 74 68 69 73 20 72 6f | 75 74 69 6e 65 20 69 73 | this ro|utine is|
|000049d0| 20 6d 6f 64 69 66 69 65 | 64 20 73 6f 20 74 68 61 | modifie|d so tha|
|000049e0| 74 20 77 68 65 6e 20 51 | 75 69 63 6b 44 72 61 77 |t when Q|uickDraw|
|000049f0| 20 47 58 20 69 73 20 70 | 72 65 73 65 6e 74 20 28 | GX is p|resent (|
|00004a00| 61 73 20 69 6e 64 69 63 | 61 74 65 64 20 62 79 20 |as indic|ated by |
|00004a10| 74 68 65 20 67 47 58 49 | 73 50 72 65 73 65 6e 74 |the gGXI|sPresent|
|00004a20| 20 67 6c 6f 62 61 6c 20 | 76 61 72 69 61 62 6c 65 | global |variable|
|00004a30| 29 2c 20 74 68 65 20 61 | 70 70 6c 69 63 61 74 69 |), the a|pplicati|
|00004a40| 6f 6e 20 63 72 65 61 74 | 65 73 20 61 20 67 78 4a |on creat|es a gxJ|
|00004a50| 6f 62 20 66 6f 72 20 65 | 61 63 68 20 64 6f 63 75 |ob for e|ach docu|
|00004a60| 6d 65 6e 74 2c 20 75 73 | 69 6e 67 20 74 68 65 20 |ment, us|ing the |
|00004a70| 47 58 4e 65 77 4a 6f 62 | 20 72 6f 75 74 69 6e 65 |GXNewJob| routine|
|00004a80| 2e 20 49 66 20 51 75 69 | 63 6b 44 72 61 77 20 47 |. If Qui|ckDraw G|
|00004a90| 58 20 69 73 20 6e 6f 74 | 20 70 72 65 73 65 6e 74 |X is not| present|
|00004aa0| 2c 20 74 68 65 20 61 70 | 70 6c 69 63 61 74 69 6f |, the ap|plicatio|
|00004ab0| 6e 20 63 72 65 61 74 65 | 73 20 61 20 70 72 69 6e |n create|s a prin|
|00004ac0| 74 20 72 65 63 6f 72 64 | 20 68 61 6e 64 6c 65 20 |t record| handle |
|00004ad0| 28 54 48 50 72 69 6e 74 | 29 20 69 6e 73 74 65 61 |(THPrint|) instea|
|00004ae0| 64 2e 20 0d 49 74 d5 73 | 20 63 6f 6d 6d 6f 6e 20 |d. .It.s| common |
|00004af0| 66 6f 72 20 61 6e 20 61 | 70 70 6c 69 63 61 74 69 |for an a|pplicati|
|00004b00| 6f 6e 20 74 6f 20 73 74 | 6f 72 65 20 64 65 73 63 |on to st|ore desc|
|00004b10| 72 69 70 74 69 76 65 20 | 69 6e 66 6f 72 6d 61 74 |riptive |informat|
|00004b20| 69 6f 6e 20 61 62 6f 75 | 74 20 61 20 64 6f 63 75 |ion abou|t a docu|
|00004b30| 6d 65 6e 74 20 69 6e 20 | 61 20 70 72 69 76 61 74 |ment in |a privat|
|00004b40| 65 20 64 61 74 61 20 73 | 74 72 75 63 74 75 72 65 |e data s|tructure|
|00004b50| 2c 20 61 6e 64 20 6f 75 | 72 20 73 61 6d 70 6c 65 |, and ou|r sample|
|00004b60| 20 69 73 20 6e 6f 20 65 | 78 63 65 70 74 69 6f 6e | is no e|xception|
|00004b70| 2e 20 54 68 65 20 61 70 | 70 6c 69 63 61 74 69 6f |. The ap|plicatio|
|00004b80| 6e 20 75 73 65 73 20 61 | 20 70 72 69 76 61 74 65 |n uses a| private|
|00004b90| 20 73 74 72 75 63 74 75 | 72 65 20 63 61 6c 6c 65 | structu|re calle|
|00004ba0| 64 20 4d 79 44 6f 63 75 | 6d 65 6e 74 52 65 63 20 |d MyDocu|mentRec |
|00004bb0| 74 68 61 74 20 63 6f 6e | 74 61 69 6e 73 20 69 6e |that con|tains in|
|00004bc0| 66 6f 72 6d 61 74 69 6f | 6e 20 61 62 6f 75 74 20 |formatio|n about |
|00004bd0| 74 68 65 20 6e 75 6d 62 | 65 72 20 6f 66 20 70 61 |the numb|er of pa|
|00004be0| 67 65 73 20 69 6e 20 61 | 20 64 6f 63 75 6d 65 6e |ges in a| documen|
|00004bf0| 74 2c 20 74 68 65 20 63 | 75 72 72 65 6e 74 20 70 |t, the c|urrent p|
|00004c00| 61 67 65 20 62 65 69 6e | 67 20 76 69 65 77 65 64 |age bein|g viewed|
|00004c10| 2c 20 61 6e 64 20 73 6f | 20 66 6f 72 74 68 2e 20 |, and so| forth. |
|00004c20| 57 65 20 6d 6f 64 69 66 | 79 20 74 68 69 73 20 73 |We modif|y this s|
|00004c30| 74 72 75 63 74 75 72 65 | 20 61 6c 73 6f 2c 20 73 |tructure| also, s|
|00004c40| 6f 20 74 68 61 74 20 77 | 65 20 63 61 6e 20 73 74 |o that w|e can st|
|00004c50| 6f 72 65 20 61 20 64 6f | 63 75 6d 65 6e 74 d5 73 |ore a do|cument.s|
|00004c60| 20 6a 6f 62 20 72 65 66 | 65 72 65 6e 63 65 20 61 | job ref|erence a|
|00004c70| 6e 64 20 70 61 67 65 20 | 66 6f 72 6d 61 74 74 69 |nd page |formatti|
|00004c80| 6e 67 20 69 6e 66 6f 72 | 6d 61 74 69 6f 6e 20 77 |ng infor|mation w|
|00004c90| 69 74 68 20 74 68 65 20 | 64 6f 63 75 6d 65 6e 74 |ith the |document|
|00004ca0| 2e 20 41 73 20 73 65 65 | 6e 20 69 6e 20 4c 69 73 |. As see|n in Lis|
|00004cb0| 74 69 6e 67 20 32 2c 20 | 77 65 d5 76 65 20 61 64 |ting 2, |we.ve ad|
|00004cc0| 64 65 64 20 74 68 65 20 | 64 6f 63 75 6d 65 6e 74 |ded the |document|
|00004cd0| 4a 6f 62 20 61 6e 64 20 | 70 61 67 65 46 6f 72 6d |Job and |pageForm|
|00004ce0| 61 74 20 66 69 65 6c 64 | 73 20 74 6f 20 74 68 65 |at field|s to the|
|00004cf0| 20 73 74 72 75 63 74 75 | 72 65 2e 20 54 68 65 20 | structu|re. The |
|00004d00| 72 65 73 74 20 6f 66 20 | 74 68 65 20 66 69 65 6c |rest of |the fiel|
|00004d10| 64 73 20 69 6e 20 74 68 | 69 73 20 73 74 72 75 63 |ds in th|is struc|
|00004d20| 74 75 72 65 20 77 65 72 | 65 20 61 6c 72 65 61 64 |ture wer|e alread|
|00004d30| 79 20 62 65 69 6e 67 20 | 6d 61 6e 61 67 65 64 20 |y being |managed |
|00004d40| 62 79 20 74 68 65 20 51 | 75 69 63 6b 44 72 61 77 |by the Q|uickDraw|
|00004d50| 20 47 58 d0 75 6e 61 77 | 61 72 65 20 61 70 70 6c | GX.unaw|are appl|
|00004d60| 69 63 61 74 69 6f 6e 2c | 20 61 6e 64 20 77 65 d5 |ication,| and we.|
|00004d70| 6c 6c 20 63 6f 6e 74 69 | 6e 75 65 20 74 6f 20 75 |ll conti|nue to u|
|00004d80| 73 65 20 74 68 65 6d 2e | 20 0d 4c 69 73 74 69 6e |se them.| .Listin|
|00004d90| 67 20 32 2e 20 4d 79 44 | 6f 63 75 6d 65 6e 74 52 |g 2. MyD|ocumentR|
|00004da0| 65 63 2c 20 6d 6f 64 69 | 66 69 65 64 20 66 6f 72 |ec, modi|fied for|
|00004db0| 20 51 75 69 63 6b 44 72 | 61 77 20 47 58 0d 23 64 | QuickDr|aw GX.#d|
|00004dc0| 65 66 69 6e 65 20 6b 4d | 61 78 50 61 67 65 73 09 |efine kM|axPages.|
|00004dd0| 32 30 09 09 09 2f 2a 20 | 4d 61 78 20 70 61 67 65 |20.../* |Max page|
|00004de0| 73 20 74 68 65 20 73 61 | 6d 70 6c 65 20 68 61 6e |s the sa|mple han|
|00004df0| 64 6c 65 73 2e 20 2a 2f | 0d 74 79 70 65 64 65 66 |dles. */|.typedef|
|00004e00| 20 73 74 72 75 63 74 20 | 4d 79 44 6f 63 75 6d 65 | struct |MyDocume|
|00004e10| 6e 74 52 65 63 20 7b 0d | 09 09 54 48 50 72 69 6e |ntRec {.|..THPrin|
|00004e20| 74 09 09 64 6f 63 75 6d | 65 6e 74 50 72 69 6e 74 |t..docum|entPrint|
|00004e30| 48 64 6c 3b 09 2f 2a 20 | 50 72 69 6e 74 20 72 65 |Hdl;./* |Print re|
|00004e40| 63 6f 72 64 20 66 6f 72 | 20 64 6f 63 75 6d 65 6e |cord for| documen|
|00004e50| 74 2e 20 2a 2f 0d 09 09 | 67 78 4a 6f 62 09 09 64 |t. */...|gxJob..d|
|00004e60| 6f 63 75 6d 65 6e 74 4a | 6f 62 3b 09 09 09 2f 2a |ocumentJ|ob;.../*|
|00004e70| 20 4a 6f 62 20 66 6f 72 | 20 64 6f 63 75 6d 65 6e | Job for| documen|
|00004e80| 74 2e 20 2a 2f 0d 09 09 | 67 78 46 6f 72 6d 61 74 |t. */...|gxFormat|
|00004e90| 09 70 61 67 65 46 6f 72 | 6d 61 74 5b 6b 4d 61 78 |.pageFor|mat[kMax|
|00004ea0| 50 61 67 65 73 5d 3b 09 | 2f 2a 20 46 6f 72 6d 61 |Pages];.|/* Forma|
|00004eb0| 74 20 66 6f 72 20 65 61 | 63 68 20 70 61 67 65 2e |t for ea|ch page.|
|00004ec0| 20 2a 2f 0d 09 09 09 09 | 09 09 09 09 09 09 09 09 | */.....|........|
|00004ed0| 09 2f 2a 20 49 66 20 6e | 69 6c 2c 20 77 65 20 75 |./* If n|il, we u|
|00004ee0| 73 65 20 74 68 65 20 6a | 6f 62 20 66 6f 72 6d 61 |se the j|ob forma|
|00004ef0| 74 2e 20 2a 2f 0d 09 09 | 6c 6f 6e 67 09 09 09 6e |t. */...|long...n|
|00004f00| 75 6d 50 61 67 65 73 3b | 09 09 09 09 2f 2a 20 4e |umPages;|..../* N|
|00004f10| 75 6d 62 65 72 20 6f 66 | 20 70 61 67 65 73 20 69 |umber of| pages i|
|00004f20| 6e 20 64 6f 63 75 6d 65 | 6e 74 2e 20 2a 2f 0d 09 |n docume|nt. */..|
|00004f30| 09 6c 6f 6e 67 09 09 09 | 63 75 72 50 61 67 65 3b |.long...|curPage;|
|00004f40| 09 09 09 09 2f 2a 20 54 | 68 65 20 63 75 72 72 65 |..../* T|he curre|
|00004f50| 6e 74 20 70 61 67 65 20 | 64 69 73 70 6c 61 79 65 |nt page |displaye|
|00004f60| 64 2e 20 2a 2f 0d 09 09 | 46 53 53 70 65 63 09 09 |d. */...|FSSpec..|
|00004f70| 64 6f 63 75 6d 65 6e 74 | 46 53 53 70 65 63 3b 09 |document|FSSpec;.|
|00004f80| 09 2f 2a 20 44 6f 63 75 | 6d 65 6e 74 27 73 20 66 |./* Docu|ment's f|
|00004f90| 69 6c 65 20 73 70 65 63 | 2e 20 2a 2f 0d 09 09 53 |ile spec|. */...S|
|00004fa0| 74 72 33 31 09 09 64 6f | 63 75 6d 65 6e 74 54 69 |tr31..do|cumentTi|
|00004fb0| 74 6c 65 3b 09 09 2f 2a | 20 54 68 65 20 74 69 74 |tle;../*| The tit|
|00004fc0| 6c 65 20 6f 66 20 74 68 | 69 73 20 64 6f 63 75 6d |le of th|is docum|
|00004fd0| 65 6e 74 2e 20 2a 2f 0d | 09 09 57 69 6e 64 6f 77 |ent. */.|..Window|
|00004fe0| 50 74 72 09 64 6f 63 75 | 6d 65 6e 74 57 69 6e 64 |Ptr.docu|mentWind|
|00004ff0| 6f 77 3b 09 09 2f 2a 20 | 54 68 65 20 77 69 6e 64 |ow;../* |The wind|
|00005000| 6f 77 20 66 6f 72 20 74 | 68 69 73 20 64 6f 63 75 |ow for t|his docu|
|00005010| 6d 65 6e 74 2e 2a 2f 0d | 7d 20 4d 79 44 6f 63 75 |ment.*/.|} MyDocu|
|00005020| 6d 65 6e 74 52 65 63 2c | 20 2a 4d 79 44 6f 63 75 |mentRec,| *MyDocu|
|00005030| 6d 65 6e 74 50 74 72 3b | 0d 09 0d 57 65 20 61 6c |mentPtr;|...We al|
|00005040| 73 6f 20 6e 65 65 64 20 | 74 6f 20 6d 6f 64 69 66 |so need |to modif|
|00005050| 79 20 74 68 65 20 61 70 | 70 6c 69 63 61 74 69 6f |y the ap|plicatio|
|00005060| 6e d5 73 20 4d 79 44 69 | 73 70 6f 73 65 44 6f 63 |n.s MyDi|sposeDoc|
|00005070| 75 6d 65 6e 74 20 72 6f | 75 74 69 6e 65 2c 20 77 |ument ro|utine, w|
|00005080| 68 69 63 68 20 69 73 20 | 63 61 6c 6c 65 64 20 77 |hich is |called w|
|00005090| 68 65 6e 65 76 65 72 20 | 61 20 64 6f 63 75 6d 65 |henever |a docume|
|000050a0| 6e 74 20 69 73 20 63 6c | 6f 73 65 64 2e 20 49 6e |nt is cl|osed. In|
|000050b0| 20 74 68 65 20 6d 6f 64 | 69 66 69 65 64 20 72 6f | the mod|ified ro|
|000050c0| 75 74 69 6e 65 2c 20 77 | 65 20 64 69 73 70 6f 73 |utine, w|e dispos|
|000050d0| 65 20 6f 66 20 74 68 65 | 20 64 6f 63 75 6d 65 6e |e of the| documen|
|000050e0| 74 d5 73 20 67 78 4a 6f | 62 2e 20 0d 54 68 65 20 |t.s gxJo|b. .The |
|000050f0| 63 68 61 6e 67 65 73 20 | 74 68 61 74 20 77 65 d5 |changes |that we.|
|00005100| 76 65 20 6d 61 64 65 20 | 73 6f 20 66 61 72 20 61 |ve made |so far a|
|00005110| 72 65 20 69 6e 64 69 63 | 61 74 69 76 65 20 6f 66 |re indic|ative of|
|00005120| 20 74 68 65 20 61 70 70 | 72 6f 61 63 68 20 77 65 | the app|roach we|
|00005130| d5 6c 6c 20 63 6f 6e 74 | 69 6e 75 65 20 74 6f 20 |.ll cont|inue to |
|00005140| 75 73 65 20 61 73 20 77 | 65 20 6d 61 6b 65 20 6f |use as w|e make o|
|00005150| 75 72 20 73 61 6d 70 6c | 65 20 51 75 69 63 6b 44 |ur sampl|e QuickD|
|00005160| 72 61 77 20 47 58 20 61 | 77 61 72 65 3a 20 61 64 |raw GX a|ware: ad|
|00005170| 64 69 6e 67 20 63 6f 64 | 65 20 74 68 61 74 20 65 |ding cod|e that e|
|00005180| 78 65 63 75 74 65 73 20 | 6f 6e 6c 79 20 69 66 20 |xecutes |only if |
|00005190| 51 75 69 63 6b 44 72 61 | 77 20 47 58 20 69 73 20 |QuickDra|w GX is |
|000051a0| 70 72 65 73 65 6e 74 2e | 20 49 66 20 74 68 65 20 |present.| If the |
|000051b0| 75 73 65 72 20 69 73 6e | d5 74 20 72 75 6e 6e 69 |user isn|.t runni|
|000051c0| 6e 67 20 51 75 69 63 6b | 44 72 61 77 20 47 58 2c |ng Quick|Draw GX,|
|000051d0| 20 6f 75 72 20 63 6f 6e | 76 65 72 74 65 64 20 73 | our con|verted s|
|000051e0| 61 6d 70 6c 65 20 77 69 | 6c 6c 20 61 70 70 65 61 |ample wi|ll appea|
|000051f0| 72 20 61 6e 64 20 66 75 | 6e 63 74 69 6f 6e 20 61 |r and fu|nction a|
|00005200| 73 20 74 68 65 20 6f 72 | 69 67 69 6e 61 6c 20 64 |s the or|iginal d|
|00005210| 69 64 2e 20 42 75 74 20 | 69 66 20 51 75 69 63 6b |id. But |if Quick|
|00005220| 44 72 61 77 20 47 58 20 | 69 73 20 70 72 65 73 65 |Draw GX |is prese|
|00005230| 6e 74 2c 20 61 6c 6c 20 | 74 68 65 20 6e 65 77 20 |nt, all |the new |
|00005240| 66 75 6e 63 74 69 6f 6e | 61 6c 69 74 79 20 77 69 |function|ality wi|
|00005250| 6c 6c 20 6b 69 63 6b 20 | 69 6e 2e 20 0d 4f 56 45 |ll kick |in. .OVE|
|00005260| 52 52 49 44 49 4e 47 20 | 47 58 50 52 49 4e 54 49 |RRIDING |GXPRINTI|
|00005270| 4e 47 45 56 45 4e 54 0d | 57 68 65 6e 20 77 65 20 |NGEVENT.|When we |
|00005280| 61 64 64 65 64 20 73 75 | 70 70 6f 72 74 20 66 6f |added su|pport fo|
|00005290| 72 20 67 78 4a 6f 62 73 | 20 69 6e 20 74 68 65 20 |r gxJobs| in the |
|000052a0| 4d 79 43 72 65 61 74 65 | 44 6f 63 75 6d 65 6e 74 |MyCreate|Document|
|000052b0| 20 72 6f 75 74 69 6e 65 | 2c 20 77 65 20 61 6c 73 | routine|, we als|
|000052c0| 6f 20 61 64 64 65 64 20 | 74 68 65 20 66 6f 6c 6c |o added |the foll|
|000052d0| 6f 77 69 6e 67 20 6c 69 | 6e 65 20 6f 66 20 63 6f |owing li|ne of co|
|000052e0| 64 65 3a 20 0d 47 58 49 | 6e 73 74 61 6c 6c 41 70 |de: .GXI|nstallAp|
|000052f0| 70 6c 69 63 61 74 69 6f | 6e 4f 76 65 72 72 69 64 |plicatio|nOverrid|
|00005300| 65 28 28 2a 63 72 65 61 | 74 65 64 44 6f 63 75 6d |e((*crea|tedDocum|
|00005310| 65 6e 74 29 2d 3e 64 6f | 63 75 6d 65 6e 74 4a 6f |ent)->do|cumentJo|
|00005320| 62 2c 20 0d 09 09 09 09 | 09 09 09 09 09 67 78 50 |b, .....|.....gxP|
|00005330| 72 69 6e 74 69 6e 67 45 | 76 65 6e 74 2c 20 4d 79 |rintingE|vent, My|
|00005340| 50 72 69 6e 74 69 6e 67 | 45 76 65 6e 74 4f 76 65 |Printing|EventOve|
|00005350| 72 72 69 64 65 29 3b 0d | 45 76 65 72 79 20 61 70 |rride);.|Every ap|
|00005360| 70 6c 69 63 61 74 69 6f | 6e 20 74 68 61 74 20 61 |plicatio|n that a|
|00005370| 73 70 69 72 65 73 20 74 | 6f 20 62 65 20 51 75 69 |spires t|o be Qui|
|00005380| 63 6b 44 72 61 77 20 47 | 58 20 61 77 61 72 65 20 |ckDraw G|X aware |
|00005390| 73 68 6f 75 6c 64 20 69 | 6e 63 6c 75 64 65 20 73 |should i|nclude s|
|000053a0| 75 63 68 20 61 20 0d 6c | 69 6e 65 2e 20 52 65 6d |uch a .l|ine. Rem|
|000053b0| 65 6d 62 65 72 2c 20 51 | 75 69 63 6b 44 72 61 77 |ember, Q|uickDraw|
|000053c0| 20 47 58 20 68 61 73 20 | 6d 6f 76 61 62 6c 65 20 | GX has |movable |
|000053d0| 6d 6f 64 61 6c 20 70 72 | 69 6e 74 69 6e 67 20 64 |modal pr|inting d|
|000053e0| 69 61 6c 6f 67 73 3b 20 | 74 68 65 20 47 58 50 72 |ialogs; |the GXPr|
|000053f0| 69 6e 74 69 6e 67 45 76 | 65 6e 74 20 6d 65 73 73 |intingEv|ent mess|
|00005400| 61 67 65 20 69 73 20 73 | 65 6e 74 20 77 68 65 6e |age is s|ent when|
|00005410| 65 76 65 72 20 61 20 64 | 69 61 6c 6f 67 20 69 73 |ever a d|ialog is|
|00005420| 20 6d 6f 76 65 64 2e 20 | 55 6e 6c 65 73 73 20 79 | moved. |Unless y|
|00005430| 6f 75 20 6f 76 65 72 72 | 69 64 65 20 47 58 50 72 |ou overr|ide GXPr|
|00005440| 69 6e 74 69 6e 67 45 76 | 65 6e 74 2c 20 79 6f 75 |intingEv|ent, you|
|00005450| 20 77 6f 6e d5 74 20 68 | 61 76 65 20 61 20 63 68 | won.t h|ave a ch|
|00005460| 61 6e 63 65 20 74 6f 20 | 75 70 64 61 74 65 20 79 |ance to |update y|
|00005470| 6f 75 72 20 61 70 70 6c | 69 63 61 74 69 6f 6e d5 |our appl|ication.|
|00005480| 73 20 77 69 6e 64 6f 77 | 73 20 77 68 65 6e 20 74 |s window|s when t|
|00005490| 68 65 20 64 69 61 6c 6f | 67 73 20 61 72 65 20 6d |he dialo|gs are m|
|000054a0| 6f 76 65 64 2e 0d 54 68 | 65 20 63 6f 64 65 20 74 |oved..Th|e code t|
|000054b0| 6f 20 73 75 70 70 6f 72 | 74 20 77 69 6e 64 6f 77 |o suppor|t window|
|000054c0| 20 75 70 64 61 74 65 73 | 20 77 68 65 6e 20 74 68 | updates| when th|
|000054d0| 65 20 70 72 69 6e 74 69 | 6e 67 20 64 69 61 6c 6f |e printi|ng dialo|
|000054e0| 67 73 20 61 72 65 20 6d | 6f 76 65 64 20 69 73 20 |gs are m|oved is |
|000054f0| 61 63 74 75 61 6c 6c 79 | 20 71 75 69 74 65 20 73 |actually| quite s|
|00005500| 69 6d 70 6c 65 2e 20 59 | 6f 75 20 6a 75 73 74 20 |imple. Y|ou just |
|00005510| 6e 65 65 64 20 74 6f 20 | 61 64 64 20 61 20 72 6f |need to |add a ro|
|00005520| 75 74 69 6e 65 20 74 68 | 61 74 20 6f 76 65 72 72 |utine th|at overr|
|00005530| 69 64 65 73 20 74 68 65 | 20 47 58 50 72 69 6e 74 |ides the| GXPrint|
|00005540| 69 6e 67 45 76 65 6e 74 | 20 6d 65 73 73 61 67 65 |ingEvent| message|
|00005550| 20 61 6e 64 20 63 61 6c | 6c 73 20 79 6f 75 72 20 | and cal|ls your |
|00005560| 65 76 65 6e 74 2d 68 61 | 6e 64 6c 69 6e 67 20 72 |event-ha|ndling r|
|00005570| 6f 75 74 69 6e 65 20 28 | 4c 69 73 74 69 6e 67 20 |outine (|Listing |
|00005580| 33 29 2c 20 61 6e 64 20 | 74 6f 20 6d 61 6b 65 20 |3), and |to make |
|00005590| 73 75 72 65 20 74 68 61 | 74 20 79 6f 75 d5 76 65 |sure tha|t you.ve|
|000055a0| 20 64 69 73 61 62 6c 65 | 64 20 74 68 65 20 61 70 | disable|d the ap|
|000055b0| 70 72 6f 70 72 69 61 74 | 65 20 6d 65 6e 75 20 69 |propriat|e menu i|
|000055c0| 74 65 6d 73 20 62 65 66 | 6f 72 65 20 64 69 73 70 |tems bef|ore disp|
|000055d0| 6c 61 79 69 6e 67 20 74 | 68 65 20 6e 65 77 20 70 |laying t|he new p|
|000055e0| 72 69 6e 74 69 6e 67 20 | 64 69 61 6c 6f 67 73 2e |rinting |dialogs.|
|000055f0| 20 4e 6f 74 65 20 74 68 | 61 74 20 79 6f 75 72 20 | Note th|at your |
|00005600| 6f 76 65 72 72 69 64 65 | 20 73 68 6f 75 6c 64 20 |override| should |
|00005610| 6e 6f 74 20 66 6f 72 77 | 61 72 64 20 74 68 65 20 |not forw|ard the |
|00005620| 47 58 50 72 69 6e 74 69 | 6e 67 45 76 65 6e 74 20 |GXPrinti|ngEvent |
|00005630| 6d 65 73 73 61 67 65 2c | 20 62 75 74 20 69 6e 73 |message,| but ins|
|00005640| 74 65 61 64 20 73 68 6f | 75 6c 64 20 70 65 72 66 |tead sho|uld perf|
|00005650| 6f 72 6d 20 61 20 74 6f | 74 61 6c 20 6f 76 65 72 |orm a to|tal over|
|00005660| 72 69 64 65 20 6f 66 20 | 69 74 2e 0d 4c 69 73 74 |ride of |it..List|
|00005670| 69 6e 67 20 33 2e 20 4d | 79 50 72 69 6e 74 69 6e |ing 3. M|yPrintin|
|00005680| 67 45 76 65 6e 74 4f 76 | 65 72 72 69 64 65 20 0d |gEventOv|erride .|
|00005690| 4f 53 45 72 72 20 4d 79 | 50 72 69 6e 74 69 6e 67 |OSErr My|Printing|
|000056a0| 45 76 65 6e 74 4f 76 65 | 72 72 69 64 65 28 45 76 |EventOve|rride(Ev|
|000056b0| 65 6e 74 52 65 63 6f 72 | 64 20 2a 61 6e 45 76 65 |entRecor|d *anEve|
|000056c0| 6e 74 2c 20 42 6f 6f 6c | 65 61 6e 20 66 69 6c 74 |nt, Bool|ean filt|
|000056d0| 65 72 45 76 65 6e 74 29 | 0d 7b 0d 09 2f 2a 20 48 |erEvent)|.{../* H|
|000056e0| 61 6e 64 6c 65 20 65 76 | 65 6e 74 73 20 69 6e 20 |andle ev|ents in |
|000056f0| 77 68 61 74 65 76 65 72 | 20 77 61 79 20 69 73 20 |whatever| way is |
|00005700| 61 70 70 72 6f 70 72 69 | 61 74 65 2e 20 4d 79 44 |appropri|ate. MyD|
|00005710| 6f 45 76 65 6e 74 20 69 | 73 0d 09 09 6f 75 72 20 |oEvent i|s...our |
|00005720| 67 65 6e 65 72 69 63 20 | 65 76 65 6e 74 20 68 61 |generic |event ha|
|00005730| 6e 64 6c 65 72 2e 20 57 | 65 20 64 6f 6e 27 74 20 |ndler. W|e don't |
|00005740| 70 61 73 73 20 69 74 20 | 65 76 65 6e 74 73 20 74 |pass it |events t|
|00005750| 68 61 74 20 69 74 0d 09 | 09 73 68 6f 75 6c 64 6e |hat it..|.shouldn|
|00005760| 27 74 20 68 61 6e 64 6c | 65 20 77 68 69 6c 65 20 |'t handl|e while |
|00005770| 70 72 69 6e 74 69 6e 67 | 20 64 69 61 6c 6f 67 73 |printing| dialogs|
|00005780| 20 61 72 65 20 64 69 73 | 70 6c 61 79 65 64 2e 20 | are dis|played. |
|00005790| 2a 2f 0d 09 69 66 20 28 | 21 66 69 6c 74 65 72 45 |*/..if (|!filterE|
|000057a0| 76 65 6e 74 29 0d 09 09 | 73 77 69 74 63 68 20 28 |vent)...|switch (|
|000057b0| 61 6e 45 76 65 6e 74 2d | 3e 77 68 61 74 29 20 7b |anEvent-|>what) {|
|000057c0| 0d 09 09 09 63 61 73 65 | 20 6d 6f 75 73 65 44 6f |....case| mouseDo|
|000057d0| 77 6e 3a 0d 09 09 09 63 | 61 73 65 20 6b 65 79 44 |wn:....c|ase keyD|
|000057e0| 6f 77 6e 3a 0d 09 09 09 | 63 61 73 65 20 61 75 74 |own:....|case aut|
|000057f0| 6f 4b 65 79 3a 0d 09 09 | 09 09 62 72 65 61 6b 3b |oKey:...|..break;|
|00005800| 0d 09 09 09 64 65 66 61 | 75 6c 74 3a 0d 09 09 09 |....defa|ult:....|
|00005810| 09 4d 79 44 6f 45 76 65 | 6e 74 28 61 6e 45 76 65 |.MyDoEve|nt(anEve|
|00005820| 6e 74 29 3b 0d 09 09 7d | 0d 09 72 65 74 75 72 6e |nt);...}|..return|
|00005830| 20 6e 6f 45 72 72 3b 0d | 7d 0d 09 0d 55 50 44 41 | noErr;.|}...UPDA|
|00005840| 54 49 4e 47 20 47 58 4a | 4f 42 20 4f 42 4a 45 43 |TING GXJ|OB OBJEC|
|00005850| 54 53 20 4f 4e 20 52 45 | 53 55 4d 45 20 45 56 45 |TS ON RE|SUME EVE|
|00005860| 4e 54 53 0d 54 68 65 72 | 65 d5 73 20 61 6e 6f 74 |NTS.Ther|e.s anot|
|00005870| 68 65 72 20 70 69 65 63 | 65 20 6f 66 20 65 76 65 |her piec|e of eve|
|00005880| 6e 74 2d 68 61 6e 64 6c | 69 6e 67 20 63 6f 64 65 |nt-handl|ing code|
|00005890| 20 74 68 61 74 20 65 76 | 65 72 79 20 51 75 69 63 | that ev|ery Quic|
|000058a0| 6b 44 72 61 77 20 47 58 | d0 61 77 61 72 65 20 61 |kDraw GX|.aware a|
|000058b0| 70 70 6c 69 63 61 74 69 | 6f 6e 20 73 68 6f 75 6c |pplicati|on shoul|
|000058c0| 64 20 69 6e 63 6c 75 64 | 65 2e 20 54 6f 20 73 75 |d includ|e. To su|
|000058d0| 70 70 6f 72 74 20 74 68 | 65 20 72 65 65 6e 74 72 |pport th|e reentr|
|000058e0| 61 6e 74 20 6e 61 74 75 | 72 65 20 6f 66 20 51 75 |ant natu|re of Qu|
|000058f0| 69 63 6b 44 72 61 77 20 | 47 58 2c 20 79 6f 75 20 |ickDraw |GX, you |
|00005900| 6d 75 73 74 20 63 61 6c | 6c 20 47 58 55 70 64 61 |must cal|l GXUpda|
|00005910| 74 65 4a 6f 62 20 6f 6e | 20 65 61 63 68 20 67 78 |teJob on| each gx|
|00005920| 4a 6f 62 20 74 68 61 74 | 20 79 6f 75 72 20 61 70 |Job that| your ap|
|00005930| 70 6c 69 63 61 74 69 6f | 6e 20 69 73 20 75 73 69 |plicatio|n is usi|
|00005940| 6e 67 20 77 68 65 6e 65 | 76 65 72 20 79 6f 75 20 |ng whene|ver you |
|00005950| 72 65 63 65 69 76 65 20 | 61 20 72 65 73 75 6d 65 |receive |a resume|
|00005960| 20 65 76 65 6e 74 2e 20 | 28 53 65 65 20 74 68 65 | event. |(See the|
|00005970| 20 63 6f 64 65 20 66 6f | 72 20 53 69 6d 70 6c 65 | code fo|r Simple|
|00005980| 20 53 61 6d 70 6c 65 20 | 47 58 20 6f 6e 20 74 68 | Sample |GX on th|
|00005990| 65 20 43 44 2e 29 20 54 | 68 69 73 20 65 6e 61 62 |e CD.) T|his enab|
|000059a0| 6c 65 73 20 51 75 69 63 | 6b 44 72 61 77 20 47 58 |les Quic|kDraw GX|
|000059b0| 20 74 6f 20 75 70 64 61 | 74 65 20 74 68 65 20 69 | to upda|te the i|
|000059c0| 6e 66 6f 72 6d 61 74 69 | 6f 6e 20 69 6e 20 74 68 |nformati|on in th|
|000059d0| 65 20 67 78 4a 6f 62 20 | 69 6e 20 63 61 73 65 20 |e gxJob |in case |
|000059e0| 69 74 20 63 68 61 6e 67 | 65 64 20 77 68 69 6c 65 |it chang|ed while|
|000059f0| 20 79 6f 75 72 20 61 70 | 70 6c 69 63 61 74 69 6f | your ap|plicatio|
|00005a00| 6e 20 77 61 73 20 69 6e | 20 74 68 65 20 62 61 63 |n was in| the bac|
|00005a10| 6b 67 72 6f 75 6e 64 2e | 20 41 73 20 61 6e 20 65 |kground.| As an e|
|00005a20| 78 61 6d 70 6c 65 2c 20 | 73 75 70 70 6f 73 65 20 |xample, |suppose |
|00005a30| 74 68 61 74 20 61 20 75 | 73 65 72 20 73 75 73 70 |that a u|ser susp|
|00005a40| 65 6e 64 73 20 79 6f 75 | 72 20 61 70 70 6c 69 63 |ends you|r applic|
|00005a50| 61 74 69 6f 6e 20 74 6f | 20 63 68 61 6e 67 65 20 |ation to| change |
|00005a60| 74 68 65 20 70 72 69 6e | 74 69 6e 67 20 65 78 74 |the prin|ting ext|
|00005a70| 65 6e 73 69 6f 6e 20 73 | 65 74 75 70 20 66 6f 72 |ension s|etup for|
|00005a80| 20 74 68 65 20 64 65 73 | 74 69 6e 61 74 69 6f 6e | the des|tination|
|00005a90| 20 0d 64 65 73 6b 74 6f | 70 20 70 72 69 6e 74 65 | .deskto|p printe|
|00005aa0| 72 2e 20 55 70 6f 6e 20 | 73 77 69 74 63 68 69 6e |r. Upon |switchin|
|00005ab0| 67 20 62 61 63 6b 20 74 | 6f 20 79 6f 75 72 20 61 |g back t|o your a|
|00005ac0| 70 70 6c 69 63 61 74 69 | 6f 6e 2c 20 74 68 69 73 |pplicati|on, this|
|00005ad0| 20 75 73 65 72 20 77 69 | 6c 6c 20 65 78 70 65 63 | user wi|ll expec|
|00005ae0| 74 20 61 6e 79 20 6f 70 | 65 6e 20 64 6f 63 75 6d |t any op|en docum|
|00005af0| 65 6e 74 73 20 74 6f 20 | 75 73 65 20 74 68 65 73 |ents to |use thes|
|00005b00| 65 20 6e 65 77 20 73 65 | 74 74 69 6e 67 73 20 61 |e new se|ttings a|
|00005b10| 74 20 70 72 69 6e 74 20 | 74 69 6d 65 2e 20 55 6e |t print |time. Un|
|00005b20| 6c 65 73 73 20 79 6f 75 | 20 63 61 6c 6c 20 47 58 |less you| call GX|
|00005b30| 55 70 64 61 74 65 4a 6f | 62 20 6f 6e 20 79 6f 75 |UpdateJo|b on you|
|00005b40| 72 20 67 78 4a 6f 62 20 | 6f 62 6a 65 63 74 73 2c |r gxJob |objects,|
|00005b50| 20 74 68 65 20 6e 65 77 | 20 73 65 74 74 69 6e 67 | the new| setting|
|00005b60| 73 20 77 6f 6e d5 74 20 | 62 65 20 74 68 65 72 65 |s won.t |be there|
|00005b70| 2e 20 0d 53 41 56 49 4e | 47 20 41 4e 44 20 4c 4f |. .SAVIN|G AND LO|
|00005b80| 41 44 49 4e 47 20 41 20 | 44 4f 43 55 4d 45 4e 54 |ADING A |DOCUMENT|
|00005b90| d5 53 20 47 58 4a 4f 42 | 0d 4e 6f 77 20 74 68 61 |.S GXJOB|.Now tha|
|00005ba0| 74 20 77 65 20 63 61 6e | 20 63 72 65 61 74 65 20 |t we can| create |
|00005bb0| 67 78 4a 6f 62 20 6f 62 | 6a 65 63 74 73 20 66 6f |gxJob ob|jects fo|
|00005bc0| 72 20 6e 65 77 20 64 6f | 63 75 6d 65 6e 74 73 2c |r new do|cuments,|
|00005bd0| 20 6c 65 74 d5 73 20 74 | 61 6b 65 20 61 20 6c 6f | let.s t|ake a lo|
|00005be0| 6f 6b 20 61 74 20 68 6f | 77 20 77 65 20 63 61 6e |ok at ho|w we can|
|00005bf0| 20 73 61 76 65 20 74 68 | 65 73 65 20 74 6f 20 64 | save th|ese to d|
|00005c00| 69 73 6b 20 61 6e 64 20 | 6c 61 74 65 72 20 72 65 |isk and |later re|
|00005c10| 74 72 69 65 76 65 20 74 | 68 65 6d 20 77 68 65 6e |trieve t|hem when|
|00005c20| 20 74 68 65 20 64 6f 63 | 75 6d 65 6e 74 73 20 61 | the doc|uments a|
|00005c30| 72 65 20 6f 70 65 6e 65 | 64 2e 20 57 65 20 77 61 |re opene|d. We wa|
|00005c40| 6e 74 20 74 6f 20 73 61 | 76 65 20 74 68 65 6d 20 |nt to sa|ve them |
|00005c50| 66 6f 72 20 74 68 65 20 | 73 61 6d 65 20 72 65 61 |for the |same rea|
|00005c60| 73 6f 6e 20 74 68 61 74 | 20 77 65 20 77 61 6e 74 |son that| we want|
|00005c70| 20 74 6f 20 73 74 6f 72 | 65 20 70 72 69 6e 74 20 | to stor|e print |
|00005c80| 72 65 63 6f 72 64 73 20 | 77 69 74 68 20 64 6f 63 |records |with doc|
|00005c90| 75 6d 65 6e 74 73 20 75 | 6e 64 65 72 20 6e 6f 6e |uments u|nder non|
|00005ca0| d0 51 75 69 63 6b 44 72 | 61 77 20 47 58 20 73 79 |.QuickDr|aw GX sy|
|00005cb0| 73 74 65 6d 73 3a 20 69 | 66 20 61 20 75 73 65 72 |stems: i|f a user|
|00005cc0| 20 68 61 73 20 67 6f 6e | 65 20 74 6f 20 74 68 65 | has gon|e to the|
|00005cd0| 20 74 72 6f 75 62 6c 65 | 20 6f 66 20 63 6f 6e 66 | trouble| of conf|
|00005ce0| 69 67 75 72 69 6e 67 20 | 70 72 69 6e 74 20 73 65 |iguring |print se|
|00005cf0| 74 74 69 6e 67 73 20 66 | 6f 72 20 61 20 64 6f 63 |ttings f|or a doc|
|00005d00| 75 6d 65 6e 74 2c 20 74 | 68 65 20 75 73 65 72 2d |ument, t|he user-|
|00005d10| 66 72 69 65 6e 64 6c 79 | 20 74 68 69 6e 67 20 74 |friendly| thing t|
|00005d20| 6f 20 64 6f 20 69 73 20 | 74 6f 20 75 73 65 20 74 |o do is |to use t|
|00005d30| 68 6f 73 65 20 73 65 74 | 74 69 6e 67 73 20 74 68 |hose set|tings th|
|00005d40| 65 20 6e 65 78 74 20 74 | 69 6d 65 20 74 68 65 20 |e next t|ime the |
|00005d50| 64 6f 63 75 6d 65 6e 74 | 20 69 73 20 6f 70 65 6e |document| is open|
|00005d60| 65 64 2e 0d 42 65 63 61 | 75 73 65 20 74 68 65 20 |ed..Beca|use the |
|00005d70| 64 61 74 61 20 77 65 20 | 77 61 6e 74 20 74 6f 20 |data we |want to |
|00005d80| 73 61 76 65 20 69 73 20 | 73 74 6f 72 65 64 20 69 |save is |stored i|
|00005d90| 6e 20 61 6e 20 61 62 73 | 74 72 61 63 74 20 64 61 |n an abs|tract da|
|00005da0| 74 61 20 73 74 72 75 63 | 74 75 72 65 20 28 67 78 |ta struc|ture (gx|
|00005db0| 4a 6f 62 29 2c 20 77 65 | 20 6e 65 65 64 20 61 20 |Job), we| need a |
|00005dc0| 77 61 79 20 74 6f 20 63 | 6f 6e 76 65 72 74 20 69 |way to c|onvert i|
|00005dd0| 74 20 74 6f 20 61 20 6d | 6f 72 65 20 74 61 6e 67 |t to a m|ore tang|
|00005de0| 69 62 6c 65 20 66 6f 72 | 6d 2e 20 57 65 20 61 63 |ible for|m. We ac|
|00005df0| 63 6f 6d 70 6c 69 73 68 | 20 74 68 69 73 20 77 69 |complish| this wi|
|00005e00| 74 68 20 74 68 65 20 47 | 58 46 6c 61 74 74 65 6e |th the G|XFlatten|
|00005e10| 4a 6f 62 20 6f 72 20 47 | 58 46 6c 61 74 74 65 6e |Job or G|XFlatten|
|00005e20| 4a 6f 62 54 6f 48 64 6c | 20 72 6f 75 74 69 6e 65 |JobToHdl| routine|
|00005e30| 2e 20 47 58 46 6c 61 74 | 74 65 6e 4a 6f 62 20 70 |. GXFlat|tenJob p|
|00005e40| 61 73 73 65 73 20 74 68 | 65 20 63 6f 6e 76 65 72 |asses th|e conver|
|00005e50| 74 65 64 20 64 61 74 61 | 20 61 73 20 61 20 73 74 |ted data| as a st|
|00005e60| 72 65 61 6d 20 6f 66 20 | 62 79 74 65 73 2c 20 77 |ream of |bytes, w|
|00005e70| 68 65 72 65 61 73 20 47 | 58 46 6c 61 74 74 65 6e |hereas G|XFlatten|
|00005e80| 4a 6f 62 54 6f 48 64 6c | 20 70 6c 61 63 65 73 20 |JobToHdl| places |
|00005e90| 74 68 65 20 66 6c 61 74 | 74 65 6e 65 64 20 64 61 |the flat|tened da|
|00005ea0| 74 61 20 69 6e 20 61 20 | 68 61 6e 64 6c 65 2e 20 |ta in a |handle. |
|00005eb0| 59 6f 75 20 77 6f 75 6c | 64 20 74 79 70 69 63 61 |You woul|d typica|
|00005ec0| 6c 6c 79 20 75 73 65 20 | 47 58 46 6c 61 74 74 65 |lly use |GXFlatte|
|00005ed0| 6e 4a 6f 62 20 74 6f 20 | 73 74 6f 72 65 20 74 68 |nJob to |store th|
|00005ee0| 65 20 66 6c 61 74 74 65 | 6e 65 64 20 67 78 4a 6f |e flatte|ned gxJo|
|00005ef0| 62 20 69 6e 20 61 20 64 | 61 74 61 20 66 6f 72 6b |b in a d|ata fork|
|00005f00| 2c 20 62 75 74 20 47 58 | 46 6c 61 74 74 65 6e 4a |, but GX|FlattenJ|
|00005f10| 6f 62 54 6f 48 64 6c 20 | 74 6f 20 73 61 76 65 20 |obToHdl |to save |
|00005f20| 69 74 20 61 73 20 61 20 | 72 65 73 6f 75 72 63 65 |it as a |resource|
|00005f30| 2e 20 0d 53 69 6e 63 65 | 20 6f 75 72 20 61 70 70 |. .Since| our app|
|00005f40| 6c 69 63 61 74 69 6f 6e | 20 73 74 6f 72 65 73 20 |lication| stores |
|00005f50| 69 74 73 20 70 72 69 6e | 74 20 72 65 63 6f 72 64 |its prin|t record|
|00005f60| 73 20 69 6e 20 72 65 73 | 6f 75 72 63 65 73 2c 20 |s in res|ources, |
|00005f70| 77 65 d5 6c 6c 20 73 74 | 6f 72 65 20 69 74 73 20 |we.ll st|ore its |
|00005f80| 66 6c 61 74 74 65 6e 65 | 64 20 67 78 4a 6f 62 20 |flattene|d gxJob |
|00005f90| 6f 62 6a 65 63 74 73 20 | 69 6e 20 72 65 73 6f 75 |objects |in resou|
|00005fa0| 72 63 65 73 20 61 73 20 | 77 65 6c 6c 2e 20 54 6f |rces as |well. To|
|00005fb0| 20 64 6f 20 74 68 69 73 | 2c 20 77 65 20 6d 6f 64 | do this|, we mod|
|00005fc0| 69 66 79 20 6f 75 72 20 | 61 70 70 6c 69 63 61 74 |ify our |applicat|
|00005fd0| 69 6f 6e d5 73 20 4d 79 | 53 61 76 65 50 72 69 6e |ion.s My|SavePrin|
|00005fe0| 74 49 6e 66 6f 20 72 6f | 75 74 69 6e 65 2c 20 77 |tInfo ro|utine, w|
|00005ff0| 68 69 63 68 20 69 73 20 | 63 61 6c 6c 65 64 20 74 |hich is |called t|
|00006000| 6f 20 73 61 76 65 20 70 | 72 69 6e 74 20 72 65 63 |o save p|rint rec|
|00006010| 6f 72 64 73 20 74 6f 20 | 64 69 73 6b 2e 20 49 66 |ords to |disk. If|
|00006020| 20 51 75 69 63 6b 44 72 | 61 77 20 47 58 20 69 73 | QuickDr|aw GX is|
|00006030| 20 70 72 65 73 65 6e 74 | 2c 20 74 68 65 20 72 6f | present|, the ro|
|00006040| 75 74 69 6e 65 20 77 69 | 6c 6c 20 69 6e 73 74 65 |utine wi|ll inste|
|00006050| 61 64 20 73 61 76 65 20 | 6f 75 72 20 66 6c 61 74 |ad save |our flat|
|00006060| 74 65 6e 65 64 20 67 78 | 4a 6f 62 2e 20 0d 49 6e |tened gx|Job. .In|
|00006070| 20 74 68 65 20 66 6f 6c | 6c 6f 77 69 6e 67 20 63 | the fol|lowing c|
|00006080| 6f 64 65 2c 20 77 65 20 | 66 6c 61 74 74 65 6e 20 |ode, we |flatten |
|00006090| 61 20 67 78 4a 6f 62 20 | 69 6e 74 6f 20 61 20 68 |a gxJob |into a h|
|000060a0| 61 6e 64 6c 65 20 63 61 | 6c 6c 65 64 20 74 68 65 |andle ca|lled the|
|000060b0| 50 72 69 6e 74 44 61 74 | 61 2c 20 77 68 69 63 68 |PrintDat|a, which|
|000060c0| 20 63 61 6e 20 74 68 65 | 6e 20 62 65 20 77 72 69 | can the|n be wri|
|000060d0| 74 74 65 6e 20 74 6f 20 | 74 68 65 20 64 69 73 6b |tten to |the disk|
|000060e0| 20 61 73 20 61 20 72 65 | 73 6f 75 72 63 65 2e 0d | as a re|source..|
|000060f0| 74 68 65 50 72 69 6e 74 | 44 61 74 61 20 3d 20 4e |thePrint|Data = N|
|00006100| 65 77 48 61 6e 64 6c 65 | 28 30 29 3b 0d 47 58 46 |ewHandle|(0);.GXF|
|00006110| 6c 61 74 74 65 6e 4a 6f | 62 54 6f 48 64 6c 28 77 |lattenJo|bToHdl(w|
|00006120| 68 69 63 68 44 6f 63 75 | 6d 65 6e 74 2d 3e 64 6f |hichDocu|ment->do|
|00006130| 63 75 6d 65 6e 74 4a 6f | 62 2c 20 74 68 65 50 72 |cumentJo|b, thePr|
|00006140| 69 6e 74 44 61 74 61 29 | 3b 0d 4e 65 78 74 2c 20 |intData)|;.Next, |
|00006150| 77 65 20 6d 6f 64 69 66 | 79 20 74 68 65 20 61 70 |we modif|y the ap|
|00006160| 70 6c 69 63 61 74 69 6f | 6e d5 73 20 4d 79 4c 6f |plicatio|n.s MyLo|
|00006170| 61 64 50 72 69 6e 74 49 | 6e 66 6f 20 72 6f 75 74 |adPrintI|nfo rout|
|00006180| 69 6e 65 2c 20 77 68 69 | 63 68 20 69 73 20 75 73 |ine, whi|ch is us|
|00006190| 65 64 20 74 6f 20 72 65 | 74 72 69 65 76 65 20 70 |ed to re|trieve p|
|000061a0| 72 69 6e 74 20 72 65 63 | 6f 72 64 73 20 74 68 61 |rint rec|ords tha|
|000061b0| 74 20 77 65 72 65 20 70 | 72 65 76 69 6f 75 73 6c |t were p|reviousl|
|000061c0| 79 20 73 61 76 65 64 20 | 77 69 74 68 20 4d 79 53 |y saved |with MyS|
|000061d0| 61 76 65 50 72 69 6e 74 | 49 6e 66 6f 2e 20 54 68 |avePrint|Info. Th|
|000061e0| 69 73 20 72 6f 75 74 69 | 6e 65 20 6d 75 73 74 20 |is routi|ne must |
|000061f0| 64 6f 20 73 65 76 65 72 | 61 6c 20 74 68 69 6e 67 |do sever|al thing|
|00006200| 73 2c 20 62 61 73 65 64 | 20 6f 6e 20 77 68 65 74 |s, based| on whet|
|00006210| 68 65 72 20 51 75 69 63 | 6b 44 72 61 77 20 47 58 |her Quic|kDraw GX|
|00006220| 20 69 73 20 70 72 65 73 | 65 6e 74 20 61 6e 64 20 | is pres|ent and |
|00006230| 77 68 65 74 68 65 72 20 | 61 20 67 78 4a 6f 62 20 |whether |a gxJob |
|00006240| 6f 72 20 70 72 69 6e 74 | 20 72 65 63 6f 72 64 20 |or print| record |
|00006250| 68 61 73 20 62 65 65 6e | 20 70 72 65 76 69 6f 75 |has been| previou|
|00006260| 73 6c 79 20 73 74 6f 72 | 65 64 20 77 69 74 68 20 |sly stor|ed with |
|00006270| 61 20 64 6f 63 75 6d 65 | 6e 74 2e 20 54 68 65 20 |a docume|nt. The |
|00006280| 66 6c 6f 77 20 6f 66 20 | 63 6f 6e 74 72 6f 6c 20 |flow of |control |
|00006290| 69 73 20 73 68 6f 77 6e | 20 69 6e 20 4c 69 73 74 |is shown| in List|
|000062a0| 69 6e 67 20 34 2e 20 0d | 4c 69 73 74 69 6e 67 20 |ing 4. .|Listing |
|000062b0| 34 2e 20 4d 79 4c 6f 61 | 64 50 72 69 6e 74 49 6e |4. MyLoa|dPrintIn|
|000062c0| 66 6f 20 66 6c 6f 77 20 | 6f 66 20 63 6f 6e 74 72 |fo flow |of contr|
|000062d0| 6f 6c 0d 69 66 20 28 67 | 47 58 49 73 50 72 65 73 |ol.if (g|GXIsPres|
|000062e0| 65 6e 74 29 20 7b 0d 09 | 69 66 20 74 68 65 72 65 |ent) {..|if there|
|000062f0| d5 73 20 61 20 70 72 65 | 76 69 6f 75 73 6c 79 20 |.s a pre|viously |
|00006300| 73 61 76 65 64 20 67 78 | 4a 6f 62 0d 09 09 75 6e |saved gx|Job...un|
|00006310| 66 6c 61 74 74 65 6e 20 | 69 74 20 61 6e 64 20 75 |flatten |it and u|
|00006320| 73 65 20 69 74 0d 09 65 | 6c 73 65 0d 09 09 69 66 |se it..e|lse...if|
|00006330| 20 74 68 65 72 65 d5 73 | 20 61 20 70 72 65 76 69 | there.s| a previ|
|00006340| 6f 75 73 6c 79 20 73 61 | 76 65 64 20 70 72 69 6e |ously sa|ved prin|
|00006350| 74 20 72 65 63 6f 72 64 | 0d 09 09 09 63 6f 6e 76 |t record|....conv|
|00006360| 65 72 74 20 74 68 61 74 | 20 74 6f 20 61 20 67 78 |ert that| to a gx|
|00006370| 4a 6f 62 20 61 6e 64 20 | 75 73 65 20 69 74 0d 09 |Job and |use it..|
|00006380| 09 65 6c 73 65 0d 09 09 | 09 75 73 65 20 74 68 65 |.else...|.use the|
|00006390| 20 64 65 66 61 75 6c 74 | 20 67 78 4a 6f 62 20 77 | default| gxJob w|
|000063a0| 65 20 63 72 65 61 74 65 | 64 20 69 6e 20 4d 79 43 |e create|d in MyC|
|000063b0| 72 65 61 74 65 44 6f 63 | 75 6d 65 6e 74 0d 7d 0d |reateDoc|ument.}.|
|000063c0| 65 6c 73 65 20 7b 0d 09 | 69 66 20 74 68 65 72 65 |else {..|if there|
|000063d0| d5 73 20 61 20 70 72 65 | 76 69 6f 75 73 6c 79 20 |.s a pre|viously |
|000063e0| 73 61 76 65 64 20 70 72 | 69 6e 74 20 72 65 63 6f |saved pr|int reco|
|000063f0| 72 64 0d 09 09 75 73 65 | 20 69 74 0d 09 65 6c 73 |rd...use| it..els|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.